Draft
Conversation
Contributor
Author
|
This fails on Node v20, we might want to just remove that from the test matrix as active support ended 22 Oct 2024? |
Builds two addons from the same C source with different NAPI_VERSION defines (10 and 9) to verify that finalizers attempting to access JS during shutdown receive napi_cannot_run_js or napi_pending_exception (respectively), or napi_ok if the event loop is still running. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
91187a6 to
a0f9aee
Compare
Contributor
Author
|
CI fails on Node.js v20 with SIGSEGV because Node-API version 10 is not fully supported on v20 — the fix landed in nodejs/node#55676 (v22.14.0+, never backported to v20). Blocked on #37 (dropping Node v20 from CI). |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports
test_cannot_run_jsfromnode/test/js-native-api/to the CTS.test_cannot_run_jswithNAPI_VERSION=10,test_pending_exceptionwithNAPI_VERSION=9) to cover both code paths in the finalizernapi_get_named_propertyreturnsnapi_cannot_run_js(v10+),napi_pending_exception(v9), ornapi_okif the event loop is still runningUpstream source: https://github.com/nodejs/node/tree/main/test/js-native-api/test_cannot_run_js
Test plan
npm run addons:configure && npm run addons:build— both addons compile cleanlynpm run node:test— all 56 tests pass🤖 Generated with Claude Code