| Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| index 75d3864d39fc5bd556736709e9f0dde073e3fd17..687c6089d4475d38c123f72ea86532d666823bb8 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -751,8 +751,9 @@ void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(
|
| WebScriptExecutionCallback* callback) {
|
| DCHECK(frame());
|
|
|
| - SuspendableScriptExecutor::createAndRun(
|
| + SuspendableScriptExecutor* executor = SuspendableScriptExecutor::create(
|
| frame(), 0, createSourcesVector(&source, 1), userGesture, callback);
|
| + executor->run();
|
| }
|
|
|
| void WebLocalFrameImpl::requestExecuteV8Function(
|
| @@ -800,14 +801,26 @@ void WebLocalFrameImpl::requestExecuteScriptInIsolatedWorld(
|
| const WebScriptSource* sourcesIn,
|
| unsigned numSources,
|
| bool userGesture,
|
| + ScriptExecutionType option,
|
| WebScriptExecutionCallback* callback) {
|
| DCHECK(frame());
|
| CHECK_GT(worldID, 0);
|
| CHECK_LT(worldID, EmbedderWorldIdLimit);
|
|
|
| - SuspendableScriptExecutor::createAndRun(
|
| + SuspendableScriptExecutor* executor = SuspendableScriptExecutor::create(
|
| frame(), worldID, createSourcesVector(sourcesIn, numSources), userGesture,
|
| callback);
|
| + switch (option) {
|
| + case AsyncBlockingOnload:
|
| + executor->runAsync(true);
|
| + break;
|
| + case Asynchronous:
|
| + executor->runAsync(false);
|
| + break;
|
| + case Synchronous:
|
| + executor->run();
|
| + break;
|
| + }
|
| }
|
|
|
| // TODO(bashi): Consider returning MaybeLocal.
|
|
|