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

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

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 7 years, 3 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/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp
index 8d6ca4f79ef4a0c6da548a5070a90d48427049c5..7bc53648ba21efc6d4c91de086b9d74975015633 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -28,6 +28,7 @@
#include "V8TestObject.h"
#include "bindings/tests/idls/TestImplements.h"
#include "bindings/tests/idls/TestPartialInterface.h"
+#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
@@ -763,7 +764,7 @@ static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V
static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (UNLIKELY(args.Length() < 2)) {
- throwNotEnoughArgumentsError(args.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToExecute("implementsMethod2", "TestInterface", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIsolate());
return;
}
TestInterface* imp = V8TestInterface::toNative(args.Holder());
@@ -852,7 +853,7 @@ static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8:
static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (UNLIKELY(args.Length() < 2)) {
- throwNotEnoughArgumentsError(args.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2", "TestInterface", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIsolate());
return;
}
TestInterface* imp = V8TestInterface::toNative(args.Holder());
@@ -916,7 +917,7 @@ static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8:
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (UNLIKELY(args.Length() < 1)) {
- throwNotEnoughArgumentsError(args.GetIsolate());
+ throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestInterface", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
return;
}
ExceptionState es(args.GetIsolate());
« no previous file with comments | « Source/bindings/tests/results/V8TestExtendedEvent.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698