-
Notifications
You must be signed in to change notification settings - Fork 682
Add promise rejection tracker support #4012
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
Add promise rejection tracker support #4012
Conversation
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
Related feature request: #2931 . |
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); | ||
|
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.
There should be also a test where the "global" reject handler is not invoked as the reject was handled already.
@@ -30,8 +30,11 @@ static const jerry_char_t test_source[] = TEST_STRING_LITERAL ( | |||
); | |||
|
|||
static int count_in_assert = 0; | |||
static int tracter_counter = 0; |
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.
What does "tracter" mean?
|
||
**Summary** | ||
|
||
Register a promise rejection tracker callback for the engine. |
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.
We should provide more details here imho and also mention the HostPromiseRejectionTracker
from the standard here.
The PR should be reworked as a port function, so closing the PR for now. |
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu