Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 2272613003: binding: Retires ExceptionState::throwIfNeeded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d7c0f26d43f625e1156c65fc56020f0ab9cebb26..1dc4d07e5b6b59d90009866ff1edb0f78280470a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -70,7 +70,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(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
- exceptionState.throwIfNeeded();
return;
}
@@ -92,7 +91,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(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
- exceptionState.throwIfNeeded();
return;
}
@@ -129,7 +127,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(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
- exceptionState.throwIfNeeded();
return;
}
@@ -166,7 +163,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;
}
@@ -185,7 +181,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;
}
@@ -205,18 +200,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)
@@ -224,7 +217,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(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
- exceptionState.throwIfNeeded();
return;
}

Powered by Google App Engine
This is Rietveld 408576698