fix: isolate callbacks in node_bindings #23261
Merged
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.
Description of Change
While some aspects of embedding are necessarily different between emulated Node.js and Node.js as it's embedded in the main and renderer processes of Electron, there's been some skew recently in our embedding processes resultant of the fact that we only test some of Node's functionality in emulated mode and therefore miss potential holes in non-emulated mode.
In the future, we should seek to test these more effectively, but for now we should at least close that gap by ensuring that isolate setup is better executed in non-emulated mode. There remains some work to be done here around
async_hooks
(see #23213) but that will require a little more investigation to determine what ofSetupIsolateForNode
can be safely executed in a non-emulated environment without causing collateral damage.cc @nornagon @ckerr @MarshallOfSound
Checklist
npm test
passesRelease Notes
Notes: Fixed some Wasm and diagnostics issues in main and renderer process execution of Node.js