| Index: Source/bindings/core/v8/WorkerScriptController.cpp
|
| diff --git a/Source/bindings/core/v8/WorkerScriptController.cpp b/Source/bindings/core/v8/WorkerScriptController.cpp
|
| index 24e152f4ff6c18606a8196070d6db31f10e8fe67..c287c65105c2ecc5b8264d8d2fa754b34c7bbc6a 100644
|
| --- a/Source/bindings/core/v8/WorkerScriptController.cpp
|
| +++ b/Source/bindings/core/v8/WorkerScriptController.cpp
|
| @@ -184,8 +184,10 @@ ScriptValue WorkerScriptController::evaluate(const String& script, const String&
|
| v8::TryCatch block;
|
|
|
| v8::Handle<v8::String> scriptString = v8String(isolate(), script);
|
| - v8::Handle<v8::Script> compiledScript = V8ScriptRunner::compileScript(scriptString, fileName, String(), scriptStartPosition, isolate(), nullptr, nullptr, cacheHandler, SharableCrossOrigin, v8CacheOptions);
|
| - v8::Local<v8::Value> result = V8ScriptRunner::runCompiledScript(isolate(), compiledScript, &m_workerGlobalScope);
|
| + v8::Local<v8::Script> compiledScript;
|
| + v8::MaybeLocal<v8::Value> maybeResult;
|
| + if (v8Call(V8ScriptRunner::compileScript(scriptString, fileName, String(), scriptStartPosition, isolate(), nullptr, nullptr, cacheHandler, SharableCrossOrigin, v8CacheOptions), compiledScript, block))
|
| + maybeResult = V8ScriptRunner::runCompiledScript(isolate(), compiledScript, &m_workerGlobalScope);
|
|
|
| if (!block.CanContinue()) {
|
| forbidExecution();
|
| @@ -206,7 +208,8 @@ ScriptValue WorkerScriptController::evaluate(const String& script, const String&
|
| m_globalScopeExecutionState->hadException = false;
|
| }
|
|
|
| - if (result.IsEmpty() || result->IsUndefined())
|
| + v8::Local<v8::Value> result;
|
| + if (!maybeResult.ToLocal(&result) || result->IsUndefined())
|
| return ScriptValue();
|
|
|
| return ScriptValue(m_scriptState.get(), result);
|
|
|