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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceConstructor.cpp

Issue 284163002: Better arity checks for overloads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Return properly Created 6 years, 7 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: Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp b/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
index f6337d5e81189f16eeb0faf1d629451b0688c661..cc0955ff38fc4395d8188c6cb668e97db3ae7e7d 100644
--- a/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
@@ -123,6 +123,14 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
break;
+ default:
+ if (info.Length() >= 0) {
+ throwArityTypeError(exceptionState, "[0, 6, 7, 8]", info.Length());
+ return;
+ }
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, info.Length()));
+ exceptionState.throwIfNeeded();
+ return;
}
exceptionState.throwTypeError("No matching constructor signature.");
exceptionState.throwIfNeeded();
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698