-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[v14.x-backport] node-api: rtn pending excep on napi_new_instance #39516
Conversation
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.
So … this looks good, but:
When I reviewed the original PR, the reason I approved that this was a bugfix that aligned this call site with other call sites.
However, this prompted me to take another look at the source, it seems that CHECK_MAYBE_EMPTY
most often uses napi_generic_failure
– which seems pretty wrong? An empty maybe by definition indicates a pending exception.
@addaleax previously we consider this returning status change as a possible ABI breaking change. However, the original PR does resolve a real problem, which we considered as a bug of node core. I believe it is time to re-evaluate if such a change is breaking anymore. If it is not been categorized as an ABI breaking change, we should apply the change on all other similar call sites. /cc @nodejs/node-api |
@legendecas Yeah, I think this is either an all-or-nothing situation.
But the same goes for the other call sites…? |
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
073941c
to
0061e5d
Compare
Can you please rebase? |
78bb65e
to
73e6781
Compare
ping @legendecas |
f89cf6a
to
b55b2f9
Compare
@targos updated! :) |
b3f51ee
to
327838d
Compare
When there are any JavaScript exceptions pending, `napi_pending_exception` should be returned. PR-URL: nodejs#38798 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com>
b55b2f9
to
e999999
Compare
Landed in a74032a |
When there are any JavaScript exceptions pending,
napi_pending_exception
should be returned.PR-URL: #38798
Reviewed-By: Anna Henningsen anna@addaleax.net
Reviewed-By: Michael Dawson midawson@redhat.com