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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.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/V8TestInterfaceConstructor.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
index aaed1bbe55713aeb0fb960c503ede290ed3488a1..f097bbb14ae8161fd642ed4ce1a985c40578093e 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
@@ -79,6 +79,11 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
if (!stringArg.prepare())
return;
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[2]);
+ if (!testInterfaceEmptyArg) {
+ exceptionState.throwTypeError("parameter 3 is not of type 'TestInterfaceEmpty'.");
+ exceptionState.throwIfNeeded();
+ return;
+ }
if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) {
exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an object.");
exceptionState.throwIfNeeded();
@@ -105,6 +110,11 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
if (exceptionState.throwIfNeeded())
return;
optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[8]);
+ if (!optionalTestInterfaceEmptyArg) {
+ exceptionState.throwTypeError("parameter 9 is not of type 'TestInterfaceEmpty'.");
+ exceptionState.throwIfNeeded();
+ return;
+ }
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698