Fix a few more places where we don't check for termination
Bug: chromium:1376663, chromium:1393272 Change-Id: Ie6ee25fb87f9959166b1696e36f07218d2959098 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105981 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#84835}
This commit is contained in:
parent
88b7fdae83
commit
8b283d0c7e
@ -1329,6 +1329,7 @@ void Shell::DoHostImportModuleDynamically(void* import_data) {
|
||||
static_cast<DynamicImportData*>(import_data);
|
||||
|
||||
Isolate* isolate(import_data_->isolate);
|
||||
if (isolate->IsExecutionTerminating()) return;
|
||||
HandleScope handle_scope(isolate);
|
||||
|
||||
Local<Context> realm = import_data_->context.Get(isolate);
|
||||
|
@ -326,6 +326,7 @@ void InspectorIsolateData::MessageHandler(v8::Local<v8::Message> message,
|
||||
// static
|
||||
void InspectorIsolateData::PromiseRejectHandler(v8::PromiseRejectMessage data) {
|
||||
v8::Isolate* isolate = data.GetPromise()->GetIsolate();
|
||||
if (isolate->IsExecutionTerminating()) return;
|
||||
v8::Local<v8::Context> context = isolate->GetEnteredOrMicrotaskContext();
|
||||
if (context.IsEmpty()) return;
|
||||
v8::Local<v8::Promise> promise = data.GetPromise();
|
||||
|
19
test/mjsunit/regress/regress-1376663.js
Normal file
19
test/mjsunit/regress/regress-1376663.js
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2022 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --turbofan
|
||||
|
||||
function __f_0() {
|
||||
onmessage = function(e) {
|
||||
import("./does_not_exist.js").then();
|
||||
while(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function __f_1() {
|
||||
}
|
||||
let sab = new SharedArrayBuffer();
|
||||
let w1 = new Worker(__f_0, {type: 'function'});
|
||||
w1.postMessage({sab: sab});
|
||||
let w2 = new Worker(__f_1, {type: 'function'});
|
Loading…
Reference in New Issue
Block a user