GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — errors: handle V8 warnings in DisallowJavascriptExecutionScope · nodejs/node@e4e5137

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_errors.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,12 @@ void PerIsolateMessageListener(Local<Message> message, Local<Value> error) {
10641064
filename,
10651065
message->GetLineNumber(env->context()).FromMaybe(-1),
10661066
msg);
1067-
USE(ProcessEmitWarningGeneric(env, warning, "V8"));
1067+
// Defer the warning to the next event loop iteration. This prevents
1068+
// crashes when V8 emits warnings during code evaluation with
1069+
// throwOnSideEffect.
1070+
env->SetImmediate([warning](Environment* env) {
1071+
ProcessEmitWarningGeneric(env, warning, "V8");
1072+
});
10681073
break;
10691074
}
10701075
case Isolate::MessageErrorLevel::kMessageError:

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.