| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d3ef412 commit e4e5137
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1064,7 +1064,12 @@ void PerIsolateMessageListener(Local<Message> message, Local<Value> error) { | |||
| 1064 | 1064 | filename, | |
| 1065 | 1065 | message->GetLineNumber(env->context()).FromMaybe(-1), | |
| 1066 | 1066 | 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 | + }); | ||
| 1068 | 1073 | break; | |
| 1069 | 1074 | } | |
| 1070 | 1075 | case Isolate::MessageErrorLevel::kMessageError: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments