-
Notifications
You must be signed in to change notification settings - Fork 30k
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
node-api: return napi_exception_pending on throwing proxy handlers #48607
Conversation
Review requested:
|
e899363
to
3b3bc46
Compare
We discussed in the meeting today. We already have some similar callsites which are returning the exception correctly and therefore should already be handling the way the status code will be returned after the update. @legendecas suggested that we run CITGM as well to gather some more info. |
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.
One minor suggestion.
Failed to start CI- Validating Jenkins credentials ✔ Jenkins credentials valid - Starting PR CI job ✘ Failed to start PR CI: 200 OKhttps://github.com/nodejs/node/actions/runs/5689928114 |
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
Seemingly related test failure:
|
Yes, I'm trying to reproduce it locally with an arm Linux setup. |
The debug test failure is caused by the fact that The problem can happen whenever |
Accessing JS objects can be trapped with proxy handlers. These handlers can throw when no node-api errors occur. In such cases, `napi_pending_exception` should be returned.
4b74fa5
to
a4f2dbf
Compare
@nodejs/node-api CI has passed. Would you mind taking a look at this again? Thank you! |
As discussed at node-api meeting Oct 20, the change is essentially a clean rebase so I'm going to land this. This depends on 17a74dd which is included in v21.x. |
Commit Queue failed- Loading data for nodejs/node/pull/48607 ✔ Done loading data for nodejs/node/pull/48607 ----------------------------------- PR info ------------------------------------ Title node-api: return napi_exception_pending on throwing proxy handlers (#48607) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch legendecas:node-api/define-property -> nodejs:main Labels c++, node-api, needs-ci, dont-land-on-v18.x, dont-land-on-v20.x Commits 1 - node-api: return napi_exception_pending on proxy handlers Committers 1 - Chengzhong Wu PR-URL: https://github.com/nodejs/node/pull/48607 Reviewed-By: Gabriel Schulhof Reviewed-By: Michael Dawson ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/48607 Reviewed-By: Gabriel Schulhof Reviewed-By: Michael Dawson -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - node-api: return napi_exception_pending on proxy handlers ℹ This PR was created on Fri, 30 Jun 2023 03:51:49 GMT ✔ Approvals: 2 ✔ - Gabriel Schulhof (@gabrielschulhof): https://github.com/nodejs/node/pull/48607#pullrequestreview-1584729738 ✔ - Michael Dawson (@mhdawson) (TSC): https://github.com/nodejs/node/pull/48607#pullrequestreview-1592156805 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-10-17T15:54:31Z: https://ci.nodejs.org/job/node-test-pull-request/54888/ - Querying data for job/node-test-pull-request/54888/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/6610202932 |
Landed in 52fcf14 |
Accessing JS objects can be trapped with proxy handlers. These handlers can throw when no node-api errors occur. In such cases, `napi_pending_exception` should be returned. PR-URL: #48607 Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Accessing JS objects can be trapped with proxy handlers. These handlers can throw when no node-api errors occur. In such cases, `napi_pending_exception` should be returned. PR-URL: #48607 Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Accessing JS objects can be trapped with proxy handlers. These handlers can throw when no node-api errors occur. In such cases, `napi_pending_exception` should be returned. PR-URL: nodejs#48607 Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Accessing JS objects can be trapped with proxy handlers. These
handlers can throw when no node-api errors occur. In such cases,
napi_pending_exception
should be returned.Refs: #48440 (comment)