-
Notifications
You must be signed in to change notification settings - Fork 683
Split main promise event filter into multiple filters #4792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,9 @@ main (void) | |
|
||
jerry_init (JERRY_INIT_EMPTY); | ||
|
||
jerry_promise_event_filter_t filters = (JERRY_PROMISE_EVENT_FILTER_MAIN | ||
jerry_promise_event_filter_t filters = (JERRY_PROMISE_EVENT_FILTER_CREATE | ||
| JERRY_PROMISE_EVENT_FILTER_RESOLVE | ||
| JERRY_PROMISE_EVENT_FILTER_REJECT | ||
Comment on lines
+137
to
+139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing tests where only one of these are captured. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know, but there are currently no tests for splitting filters. We plan to add more tests in the future. |
||
| JERRY_PROMISE_EVENT_FILTER_ERROR | ||
| JERRY_PROMISE_EVENT_FILTER_REACTION_JOB | ||
| JERRY_PROMISE_EVENT_FILTER_ASYNC_MAIN | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to keep the
JERRY_PROMISE_EVENT_FILTER_MAIN
and specify it's value as:JERRY_PROMISE_EVENT_FILTER_CREATE | JERRY_PROMISE_EVENT_FILTER_RESOLVE | JERRY_PROMISE_EVENT_FILTER_REJECT
? That way we keep the old way (which will catch the "main" cases) and will have the new more fine tuned option.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has never been released, so there is no need to worry about compatiblity.