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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
index 7e8293f0995be165ebf9f2a5740375d9cbc4ca61..10e57948aac7d020ebee9075fe598372f7007dda 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -47,8 +47,9 @@ static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
ExceptionState exceptionState(ExceptionState::SetterContext, "partial4LongAttribute", "TestInterface", holder, info.GetIsolate());
TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException()) {
return;
+ }
TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue);
}
@@ -64,8 +65,9 @@ static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
V8StringResource<> value;
{
value = info[0];
- if (!value.prepare())
+ if (!value.prepare()) {
return;
+ }
}
TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value);
}
@@ -86,7 +88,6 @@ static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
break;
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
- exceptionState.throwIfNeeded();
return;
}
@@ -95,8 +96,9 @@ static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
V8StringResource<> value;
{
value = info[0];
- if (!value.prepare())
+ if (!value.prepare()) {
return;
+ }
}
TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value);
}
@@ -117,7 +119,6 @@ static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
break;
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
- exceptionState.throwIfNeeded();
return;
}
@@ -152,6 +153,7 @@ static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value());
+ exceptionState.clearException();
return;
}
@@ -160,8 +162,9 @@ static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
V8StringResource<> value;
{
value = info[0];
- if (!value.prepare(exceptionState))
+ if (!value.prepare(exceptionState)) {
return;
+ }
}
v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMethodPartialOverload(value).v8Value());
}
@@ -191,6 +194,7 @@ static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value());
+ exceptionState.clearException();
return;
}
@@ -200,8 +204,9 @@ static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
V8StringResource<> value;
{
value = info[0];
- if (!value.prepare())
+ if (!value.prepare()) {
return;
+ }
}
TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value);
}
@@ -240,7 +245,6 @@ static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
break;
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
- exceptionState.throwIfNeeded();
return;
}
@@ -249,21 +253,20 @@ static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoidTestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
setMinimumArityTypeError(exceptionState, 1, info.Length());
- exceptionState.throwIfNeeded();
return;
}
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
V8StringResource<> arg;
{
arg = info[0];
- if (!arg.prepare())
+ if (!arg.prepare()) {
return;
+ }
const char* validValues[] = {
"EnumModulesValue1",
"EnumModulesValue2",
};
if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnumModules", exceptionState)) {
- exceptionState.throwIfNeeded();
return;
}
}
@@ -280,8 +283,9 @@ static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
V8StringResource<> value;
{
value = info[0];
- if (!value.prepare())
+ if (!value.prepare()) {
return;
+ }
}
TestInterfacePartial3Implementation::partial2StaticVoidMethod(value);
}
@@ -302,7 +306,6 @@ static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
break;
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
- exceptionState.throwIfNeeded();
return;
}

Powered by Google App Engine
This is Rietveld 408576698