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

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

Issue 221073003: Add helper functions for throwing arity-related TypeErrors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix style nits. Created 6 years, 9 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/V8TestInterfaceWillBeGarbageCollected.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
index 8f1b4dae5cc54a73d598053d08270dbee0bcbb2e..49e0cd8e98760fb3fd74595f89e4709c68c4ae29 100644
--- a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
@@ -75,7 +75,7 @@ static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("func", "TestInterfaceWillBeGarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ throwArityTypeErrorForMethod("func", "TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate());
return;
}
TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toNative(info.Holder());
@@ -94,7 +94,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Isolate* isolate = info.GetIsolate();
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceWillBeGarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ throwArityTypeErrorForConstructor("TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate());
return;
}
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698