Index: third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp b/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp |
index e449086ed7acba36288a6a3904f1cc105dae021c..5ac409892eafed661905d79cf026bf8bda02189f 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp |
@@ -4,6 +4,7 @@ |
#include "bindings/core/v8/GeneratedCodeHelper.h" |
+#include "bindings/core/v8/ExceptionMessages.h" |
#include "bindings/core/v8/SerializedScriptValue.h" |
#include "bindings/core/v8/V8Binding.h" |
@@ -26,4 +27,24 @@ v8::Local<v8::Value> v8Deserialize(v8::Isolate* isolate, PassRefPtr<SerializedSc |
return v8::Null(isolate); |
} |
+void throwMinimumArityError(ExceptionState& exceptionState, unsigned expected, unsigned actual) |
haraken
2016/09/02 16:24:13
These helper functions are just one line, so I'd p
Yuki
2016/09/05 07:19:25
I think we'd like to guarantee the following thing
haraken
2016/09/05 08:24:22
I don't know. Even if we adopt your definition of
|
+{ |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected, actual)); |
+} |
+ |
+void throwInvalidArityError(ExceptionState& exceptionState, const char* validRange, unsigned actual) |
+{ |
+ exceptionState.throwTypeError(ExceptionMessages::invalidArity(validRange, actual)); |
+} |
+ |
+void throwMinimumArityErrorForMethod(v8::Isolate* isolate, const char* interface, const char* method, unsigned expected, unsigned actual) |
+{ |
+ V8ThrowException::throwTypeError(isolate, ExceptionMessages::failedToExecute(method, interface, ExceptionMessages::notEnoughArguments(expected, actual))); |
+} |
+ |
+void throwMinimumArityErrorForConstructor(v8::Isolate* isolate, const char* interface, unsigned expected, unsigned actual) |
+{ |
+ V8ThrowException::throwTypeError(isolate, ExceptionMessages::failedToConstruct(interface, ExceptionMessages::notEnoughArguments(expected, actual))); |
+} |
+ |
} // namespace blink |