-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
n-api: make thread-safe-function calls properly #28606
n-api: make thread-safe-function calls properly #28606
Conversation
Use `NapiCallIntoModuleThrow()` to execute the call into JavaScript and the finalizer for consistency with the rest of the calls into the N-API addon.
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 assume it would be possible to add tests for this?
@addaleax I ran into this as I was working on the I guess we need a test suite for Either way I'm finding it increasingly important that we test the off-nominal operation of N-API. |
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
CI: https://ci.nodejs.org/job/node-test-pull-request/24365/
|
Landed in f5b40b2. |
Use `NapiCallIntoModuleThrow()` to execute the call into JavaScript and the finalizer for consistency with the rest of the calls into the N-API addon. PR-URL: nodejs#28606 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Use `NapiCallIntoModuleThrow()` to execute the call into JavaScript and the finalizer for consistency with the rest of the calls into the N-API addon. PR-URL: #28606 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Use
NapiCallIntoModuleThrow()
to execute the call into JavaScript andthe finalizer for consistency with the rest of the calls into the N-API
addon.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes