Skip to content

Conversation

@rerobika
Copy link
Member

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
@rerobika rerobika added api Related to the public API ES2015 Related to ES2015 features jerry-ext Related to the jerry-ext library labels Jul 17, 2020
@rerobika
Copy link
Member Author

Related feature request: #2931 .

@rerobika rerobika linked an issue Jul 17, 2020 that may be closed by this pull request
@dbatyai
Copy link
Member

dbatyai commented Jul 17, 2020

I feel like it would be better to handle this as a port function instead of a callback that can be set via the API.

TEST_ASSERT (jerry_get_error_type (last_rejected_reason) == JERRY_ERROR_TYPE);
jerry_release_value (last_rejected_promise);
jerry_release_value (last_rejected_reason);

Copy link
Contributor

Choose a reason for hiding this comment

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

There should be also a test where the "global" reject handler is not invoked as the reject was handled already.

);

static int count_in_assert = 0;
static int tracter_counter = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "tracter" mean?


**Summary**

Register a promise rejection tracker callback for the engine.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should provide more details here imho and also mention the HostPromiseRejectionTracker from the standard here.

@rerobika
Copy link
Member Author

The PR should be reworked as a port function, so closing the PR for now.

@rerobika rerobika closed this Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the public API ES2015 Related to ES2015 features jerry-ext Related to the jerry-ext library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discussion: Report unhandled promise rejections

3 participants