You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V8 warnings crash process within DisallowJavascriptExecutionScope #63473
Lowkey quick fix in #63486 , it correctly identifies the root cause and stops the fatal crash. However, I think we can do better than a raw fprintf(stderr, ...) fallback, which loses Node's structured warning format, deprecation codes, and --redirect-warnings routing.
I'd like to propose a more robust approach:
Defer the warning instead of degrading it.
When PerIsolateMessageListener fires inside a DisallowJavascriptExecutionScope, rather than immediately falling back to raw stderr, we could enqueue the warning message and flush it via a libuv idle or check handle after the no-JS scope exits. This preserves:
The (node:PID) [DEP00XX] DeprecationWarning: format
--redirect-warnings file routing
Any other structured handling Node applies to warnings
Alternatively, if deferral is too complex, the guard should be moved to the top of PerIsolateMessageListener (not just before ProcessEmitWarningGeneric) to cover all message types like not just deprecation warnings since V8 can theoretically emit other message types in a no-JS scope too.
Either way, the fix also needs a regression test : something like a REPL test that feeds asm.js code with previews enabled and asserts: (a) no crash, and (b) the deprecation warning is still visible to the user in the expected format.
I'd like to take a shot at implementing this more complete fix if the approach sounds good to maintainers. Happy to discuss any changes to my PR.
Senor @Renegade334 , need ya attention on my PR [https://github.com//pull/63491]
could you please review this fix? It addresses the crash when V8 emits warnings during REPL preview evaluation by deferring the warning emission until it's safe to call into JavaScript.
Activity
DivyanshuX9 commentedon May 22, 2026
Lowkey quick fix in #63486 , it correctly identifies the root cause and stops the fatal crash. However, I think we can do better than a raw fprintf(stderr, ...) fallback, which loses Node's structured warning format, deprecation codes, and --redirect-warnings routing.
I'd like to propose a more robust approach:
Defer the warning instead of degrading it.
When PerIsolateMessageListener fires inside a DisallowJavascriptExecutionScope, rather than immediately falling back to raw stderr, we could enqueue the warning message and flush it via a libuv idle or check handle after the no-JS scope exits. This preserves:
The (node:PID) [DEP00XX] DeprecationWarning: format
--redirect-warnings file routing
Any other structured handling Node applies to warnings
Alternatively, if deferral is too complex, the guard should be moved to the top of PerIsolateMessageListener (not just before ProcessEmitWarningGeneric) to cover all message types like not just deprecation warnings since V8 can theoretically emit other message types in a no-JS scope too.
Either way, the fix also needs a regression test : something like a REPL test that feeds asm.js code with previews enabled and asserts: (a) no crash, and (b) the deprecation warning is still visible to the user in the expected format.
I'd like to take a shot at implementing this more complete fix if the approach sounds good to maintainers. Happy to discuss any changes to my PR.
DivyanshuX9 commentedon May 22, 2026
Senor @Renegade334 , need ya attention on my PR [https://github.com//pull/63491]
could you please review this fix? It addresses the crash when V8 emits warnings during REPL preview evaluation by deferring the warning emission until it's safe to call into JavaScript.
errors: handle V8 warnings in DisallowJavascriptExecutionScope
errors: handle V8 warnings in DisallowJavascriptExecutionScope
errors: handle V8 warnings in DisallowJavascriptExecutionScope
errors: handle V8 warnings in DisallowJavascriptExecutionScope
errors: handle V8 warnings in DisallowJavascriptExecutionScope
errors: handle V8 warnings in DisallowJavascriptExecutionScope
errors: handle V8 warnings in DisallowJavascriptExecutionScope