Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
index 942680906095a013b21eadb225a693c9d78cf814..f2b3a5932758a4188acd8dff454c6c5d62767249 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
@@ -73,7 +73,6 @@ void V8Window::eventAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Val |
LocalDOMWindow* impl = toLocalDOMWindow(V8Window::toImpl(info.Holder())); |
ExceptionState exceptionState(ExceptionState::GetterContext, "event", "Window", info.Holder(), info.GetIsolate()); |
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl, exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -95,7 +94,6 @@ void V8Window::eventAttributeSetterCustom(v8::Local<v8::Value> value, const v8:: |
LocalDOMWindow* impl = toLocalDOMWindow(V8Window::toImpl(info.Holder())); |
ExceptionState exceptionState(ExceptionState::SetterContext, "event", "Window", info.Holder(), info.GetIsolate()); |
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl, exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -132,7 +130,6 @@ void V8Window::openerAttributeSetterCustom(v8::Local<v8::Value> value, const v8: |
DOMWindow* impl = V8Window::toImpl(info.Holder()); |
ExceptionState exceptionState(ExceptionState::SetterContext, "opener", "Window", info.Holder(), isolate); |
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl, exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -169,7 +166,6 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", "Window", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -184,7 +180,6 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
// If called directly by WebCore we don't have a calling context. |
if (!source) { |
exceptionState.throwTypeError("No active calling context exists."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -204,18 +199,16 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value> |
transferablesArgIndex = 1; |
} |
if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, targetOrigin, info[targetOriginArgIndex]); |
RefPtr<SerializedScriptValue> message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], &transferables, nullptr, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
window->postMessage(message.release(), transferables.messagePorts, targetOrigin, source, exceptionState); |
- exceptionState.throwIfNeeded(); |
} |
void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -223,7 +216,6 @@ void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) |
DOMWindow* impl = V8Window::toImpl(info.Holder()); |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Window", info.Holder(), info.GetIsolate()); |
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl, exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |