-
Notifications
You must be signed in to change notification settings - Fork 683
Introduce jerry_port_track_promise_rejection #4451
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
Introduce jerry_port_track_promise_rejection #4451
Conversation
94cdf15
to
59483cd
Compare
59483cd
to
a39ad7b
Compare
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.
The commit message got mixed up a bit during the update, please fix (superfluous "report" remained.) Plus, the PR title could also be updated.
d8f0141
to
7a265f4
Compare
* @param promise rejected promise | ||
* @param operation HostPromiseRejectionTracker operation | ||
*/ | ||
void jerry_port_track_promise_rejection (const jerry_value_t promise, |
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 was also considering suggesting yet another name change, to have the new function named jerry_port_promise_rejection_tracker
. That would make the new typedef and the new function names aligned, as well as the name used by the spec. However, existing port API function names usually start with a verb (get this, set that, sleep, print, log, etc. -- the only exception being fatal). So, I'm not sure about this. But we should agree upon a good name so that it doesn't need to be changed, at least in the near 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.
I'd keep this jerry_port_track_promise_rejection
for the due to the starting verb convention with the other API functions.
jerry_port_promise_rejection_tracker
would be suitable if we would rename jerry_port_log
to jerry_port_logger
and so on. So I'd leave as it for now.
7a265f4
to
b39ac3d
Compare
@akosthekiss Thanks for the review, I've updated the PR. |
This patch resolves jerryscript-project#2931. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
b39ac3d
to
7bce57c
Compare
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
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
This patch resolves #2931.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu