| Index: Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| diff --git a/Source/bindings/core/v8/PrivateScriptRunner.cpp b/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| index 6729ea5b5aba9979170a3fa0de0b1c90f16db06d..2b02e3ad89cd52ee3a20a77a2d99907dd310201c 100644
|
| --- a/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| +++ b/Source/bindings/core/v8/PrivateScriptRunner.cpp
|
| @@ -191,8 +191,8 @@ static void initializeHolderIfNeeded(ScriptState* scriptState, v8::Local<v8::Obj
|
| v8::Local<v8::Value> initializeFunction;
|
| if (classObject->Get(scriptState->context(), v8String(isolate, "initialize")).ToLocal(&initializeFunction) && initializeFunction->IsFunction()) {
|
| v8::TryCatch block;
|
| - V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(initializeFunction), scriptState->executionContext(), holder, 0, 0, isolate);
|
| - if (block.HasCaught()) {
|
| + v8::Local<v8::Value> result;
|
| + if (!V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(initializeFunction), scriptState->executionContext(), holder, 0, 0, isolate).ToLocal(&result)) {
|
| fprintf(stderr, "Private script error: Object constructor threw an exception.\n");
|
| dumpV8Message(context, block.Message());
|
| RELEASE_ASSERT_NOT_REACHED();
|
| @@ -300,8 +300,8 @@ v8::Local<v8::Value> PrivateScriptRunner::runDOMAttributeGetter(ScriptState* scr
|
| }
|
| initializeHolderIfNeeded(scriptState, classObject, holder);
|
| v8::TryCatch block;
|
| - v8::Local<v8::Value> result = V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(getter), scriptState->executionContext(), holder, 0, 0, isolate);
|
| - if (block.HasCaught()) {
|
| + v8::Local<v8::Value> result;
|
| + if (!V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(getter), scriptState->executionContext(), holder, 0, 0, isolate).ToLocal(&result)) {
|
| rethrowExceptionInPrivateScript(isolate, block, scriptStateInUserScript, ExceptionState::GetterContext, attributeName, className);
|
| block.ReThrow();
|
| return v8::Local<v8::Value>();
|
| @@ -326,8 +326,8 @@ bool PrivateScriptRunner::runDOMAttributeSetter(ScriptState* scriptState, Script
|
| initializeHolderIfNeeded(scriptState, classObject, holder);
|
| v8::Local<v8::Value> argv[] = { v8Value };
|
| v8::TryCatch block;
|
| - V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(setter), scriptState->executionContext(), holder, WTF_ARRAY_LENGTH(argv), argv, isolate);
|
| - if (block.HasCaught()) {
|
| + v8::Local<v8::Value> result;
|
| + if (!V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(setter), scriptState->executionContext(), holder, WTF_ARRAY_LENGTH(argv), argv, isolate).ToLocal(&result)) {
|
| rethrowExceptionInPrivateScript(isolate, block, scriptStateInUserScript, ExceptionState::SetterContext, attributeName, className);
|
| block.ReThrow();
|
| return false;
|
| @@ -345,8 +345,8 @@ v8::Local<v8::Value> PrivateScriptRunner::runDOMMethod(ScriptState* scriptState,
|
| }
|
| initializeHolderIfNeeded(scriptState, classObject, holder);
|
| v8::TryCatch block;
|
| - v8::Local<v8::Value> result = V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(method), scriptState->executionContext(), holder, argc, argv, scriptState->isolate());
|
| - if (block.HasCaught()) {
|
| + v8::Local<v8::Value> result;
|
| + if (!V8ScriptRunner::callFunction(v8::Local<v8::Function>::Cast(method), scriptState->executionContext(), holder, argc, argv, scriptState->isolate()).ToLocal(&result)) {
|
| rethrowExceptionInPrivateScript(scriptState->isolate(), block, scriptStateInUserScript, ExceptionState::ExecutionContext, methodName, className);
|
| block.ReThrow();
|
| return v8::Local<v8::Value>();
|
|
|