-
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
Conversation
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
1cc216d
to
5a1db9a
Compare
* JERRY_PROMISE_EVENT_RESOLVE | ||
* JERRY_PROMISE_EVENT_REJECT */ | ||
JERRY_PROMISE_EVENT_FILTER_ERROR = (1 << 1), /**< enables the following events: | ||
JERRY_PROMISE_EVENT_FILTER_CREATE = (1 << 0), /**< enables the following event: |
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.
jerry_promise_event_filter_t filters = (JERRY_PROMISE_EVENT_FILTER_CREATE | ||
| JERRY_PROMISE_EVENT_FILTER_RESOLVE | ||
| JERRY_PROMISE_EVENT_FILTER_REJECT |
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.
Missing tests where only one of these are captured.
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.
I know, but there are currently no tests for splitting filters. We plan to add more tests in the future.
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.
lgtm
No description provided.