| Index: Source/bindings/core/v8/ScriptController.cpp
|
| diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
|
| index db9d2c7d16e3bdcd48981b96facfa0a9c309ab80..40a04188dc87c7b76bb4101f8b4f787b2626da4a 100644
|
| --- a/Source/bindings/core/v8/ScriptController.cpp
|
| +++ b/Source/bindings/core/v8/ScriptController.cpp
|
| @@ -175,14 +175,17 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Handle<v8
|
| v8::TryCatch tryCatch;
|
| tryCatch.SetVerbose(true);
|
|
|
| - v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(source, isolate(), corsStatus, v8CacheOptions);
|
| + v8::Local<v8::Script> script;
|
| + if (!V8ScriptRunner::compileScript(source, isolate(), corsStatus, v8CacheOptions).ToLocal(&script))
|
| + return result;
|
|
|
| if (compilationFinishTime) {
|
| *compilationFinishTime = WTF::monotonicallyIncreasingTime();
|
| }
|
| // Keep LocalFrame (and therefore ScriptController) alive.
|
| RefPtrWillBeRawPtr<LocalFrame> protect(frame());
|
| - result = V8ScriptRunner::runCompiledScript(isolate(), script, frame()->document());
|
| + if (!V8ScriptRunner::runCompiledScript(isolate(), script, frame()->document()).ToLocal(&result))
|
| + return result;
|
| ASSERT(!tryCatch.HasCaught() || result.IsEmpty());
|
| }
|
|
|
|
|