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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp

Issue 1466563003: Make [TypeChecking=Interface] the default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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/tests/results/core/V8TestInterface2.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
index bd96c6ab29052261872143b7bac176294a1e0465..05b1177f3b53b9c3071753035f7070d9c88ac60b 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -358,6 +358,11 @@ static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
TestInterfaceEmpty* value;
{
value = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
+ if (!value) {
+ exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'.");
+ exceptionState.throwIfNeeded();
+ return;
+ }
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
bool result = impl->hasForBinding(scriptState, value, exceptionState);

Powered by Google App Engine
This is Rietveld 408576698