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

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

Issue 460923002: Decouple arity errors creation from throwing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/V8TestInterface2.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface2.cpp b/Source/bindings/tests/results/V8TestInterface2.cpp
index 80a62f296a77c2ebf13c3085c0b15befd3d9164b..3b2fbcad15cfc2a073503df3f828a4d67ed1d045 100644
--- a/Source/bindings/tests/results/V8TestInterface2.cpp
+++ b/Source/bindings/tests/results/V8TestInterface2.cpp
@@ -51,7 +51,8 @@ static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "TestInterface2", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeError(exceptionState, 1, info.Length());
+ setMinimumArityTypeError(exceptionState, 1, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
@@ -80,7 +81,8 @@ static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "TestInterface2", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
- throwMinimumArityTypeError(exceptionState, 2, info.Length());
+ setMinimumArityTypeError(exceptionState, 2, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
@@ -111,7 +113,8 @@ static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem", "TestInterface2", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeError(exceptionState, 1, info.Length());
+ setMinimumArityTypeError(exceptionState, 1, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
@@ -140,7 +143,8 @@ static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem", "TestInterface2", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeError(exceptionState, 1, info.Length());
+ setMinimumArityTypeError(exceptionState, 1, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
@@ -167,7 +171,8 @@ static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedItem", "TestInterface2", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
- throwMinimumArityTypeError(exceptionState, 2, info.Length());
+ setMinimumArityTypeError(exceptionState, 2, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
@@ -196,7 +201,8 @@ static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamedItem", "TestInterface2", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeError(exceptionState, 1, info.Length());
+ setMinimumArityTypeError(exceptionState, 1, info.Length());
+ exceptionState.throwIfNeeded();
return;
}
TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698