errors: handle V8 warnings in DisallowJavascriptExecutionScope#63486
Open
Anshikakalpana wants to merge 1 commit into
Open
errors: handle V8 warnings in DisallowJavascriptExecutionScope#63486Anshikakalpana wants to merge 1 commit into
Anshikakalpana wants to merge 1 commit into
Conversation
Fixes: nodejs#63473 Signed-off-by: Anshikakalpana <anshikajain196872@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63486 +/- ##
==========================================
+ Coverage 89.67% 90.09% +0.41%
==========================================
Files 712 716 +4
Lines 221256 226652 +5396
Branches 42394 42598 +204
==========================================
+ Hits 198420 204196 +5776
+ Misses 14684 14314 -370
+ Partials 8152 8142 -10
🚀 New features to boost your workflow:
|
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.
Fixes: #63473
Fix crash when V8 emits warning inside DisallowJavascriptExecutionScope.
When asm.js code is evaluated in the REPL with previews enabled, V8 emits a deprecation warning inside DisallowJavascriptExecutionScope. Node's warning handler tried to call process.emit() which is JS, causing a fatal crash.
Fix:
check can_call_into_js() before calling ProcessEmitWarningGeneric. If JS is not safe, print the warning directly to stderr instead.