Skip to content

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

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

zherczeg
Copy link
Member

@zherczeg zherczeg commented Oct 7, 2021

No description provided.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
* 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:
Copy link
Contributor

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.

Copy link
Member Author

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.

Comment on lines +137 to +139
jerry_promise_event_filter_t filters = (JERRY_PROMISE_EVENT_FILTER_CREATE
| JERRY_PROMISE_EVENT_FILTER_RESOLVE
| JERRY_PROMISE_EVENT_FILTER_REJECT
Copy link
Contributor

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.

Copy link
Member Author

@zherczeg zherczeg Oct 11, 2021

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.

Copy link
Contributor

@galpeter galpeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rerobika rerobika merged commit d4231e7 into jerryscript-project:master Oct 11, 2021
@zherczeg zherczeg deleted the promise_filters branch October 11, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants