| Index: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| index 1d0dcc9ba52c15c969d8f3984cb46af2aefaa951..17936962a989c0df50eb9bdee54f143dd6391178 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| @@ -543,6 +543,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledScript(
|
| probe::ExecuteScript probe(context);
|
| ThreadDebugger::willExecuteScript(isolate,
|
| script->GetUnboundScript()->GetId());
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), isolate->GetCurrentContext());
|
| result = script->Run(isolate->GetCurrentContext());
|
| ThreadDebugger::didExecuteScript(isolate);
|
| }
|
| @@ -566,6 +568,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::compileAndRunInternalScript(
|
| TRACE_EVENT0("v8", "v8.run");
|
| v8::MicrotasksScope microtasksScope(isolate,
|
| v8::MicrotasksScope::kDoNotRunMicrotasks);
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), isolate->GetCurrentContext());
|
| v8::MaybeLocal<v8::Value> result = script->Run(isolate->GetCurrentContext());
|
| CHECK(!isolate->IsDead());
|
| return result;
|
| @@ -577,6 +581,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledInternalScript(
|
| TRACE_EVENT0("v8", "v8.run");
|
| v8::MicrotasksScope microtasksScope(isolate,
|
| v8::MicrotasksScope::kDoNotRunMicrotasks);
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), isolate->GetCurrentContext());
|
| v8::MaybeLocal<v8::Value> result = script->Run(isolate->GetCurrentContext());
|
| CHECK(!isolate->IsDead());
|
| return result;
|
| @@ -613,6 +619,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callAsConstructor(
|
| v8::MicrotasksScope::kRunMicrotasks);
|
| probe::CallFunction probe(context, function, depth);
|
| ThreadDebugger::willExecuteScript(isolate, function->ScriptId());
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), isolate->GetCurrentContext());
|
| v8::MaybeLocal<v8::Value> result =
|
| constructor->CallAsConstructor(isolate->GetCurrentContext(), argc, argv);
|
| CHECK(!isolate->IsDead());
|
| @@ -652,6 +660,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(
|
| v8::MicrotasksScope::kRunMicrotasks);
|
| probe::CallFunction probe(context, function, depth);
|
| ThreadDebugger::willExecuteScript(isolate, function->ScriptId());
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), isolate->GetCurrentContext());
|
| v8::MaybeLocal<v8::Value> result =
|
| function->Call(isolate->GetCurrentContext(), receiver, argc, args);
|
| CHECK(!isolate->IsDead());
|
| @@ -670,6 +680,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction(
|
| CHECK(!ThreadState::current()->isWrapperTracingForbidden());
|
| v8::MicrotasksScope microtasksScope(isolate,
|
| v8::MicrotasksScope::kDoNotRunMicrotasks);
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), isolate->GetCurrentContext());
|
| v8::MaybeLocal<v8::Value> result =
|
| function->Call(isolate->GetCurrentContext(), receiver, argc, args);
|
| CHECK(!isolate->IsDead());
|
| @@ -683,6 +695,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::evaluateModule(
|
| TRACE_EVENT0("v8", "v8.evaluateModule");
|
| v8::MicrotasksScope microtasksScope(isolate,
|
| v8::MicrotasksScope::kRunMicrotasks);
|
| + V8PerIsolateData::EntryRealmScope entryRealmScope(
|
| + V8PerIsolateData::from(isolate), context);
|
| return module->Evaluate(context);
|
| }
|
|
|
|
|