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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 6 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/core/V8TestInterfaceOriginTrialEnabled.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
index 0fcab0f8585bcb7735a3aefdb29965536b04fc22..58322fb813bdc1d5beda67283255358ac59b5875 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
@@ -54,8 +54,9 @@ static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribute", "TestInterfaceOriginTrialEnabled", holder, info.GetIsolate());
TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::toImpl(holder);
double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException()) {
return;
+ }
impl->setDoubleAttribute(cppValue);
}
@@ -83,8 +84,9 @@ static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLongAttribute", "TestInterfaceOriginTrialEnabled", holder, info.GetIsolate());
TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException()) {
return;
+ }
impl->setConditionalLongAttribute(cppValue);
}
@@ -119,8 +121,9 @@ static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb
static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8StringResource<> cppValue = v8Value;
- if (!cppValue.prepare())
+ if (!cppValue.prepare()) {
return;
+ }
TestInterfaceOriginTrialEnabled::setStaticStringAttribute(cppValue);
}
@@ -145,7 +148,6 @@ static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleArgFloatArg", "TestInterfaceOriginTrialEnabled", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
setMinimumArityTypeError(exceptionState, 2, info.Length());
- exceptionState.throwIfNeeded();
return;
}
TestInterfaceOriginTrialEnabled* impl = V8TestInterfaceOriginTrialEnabled::toImpl(info.Holder());
@@ -153,11 +155,13 @@ static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
float floatArg;
{
doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException()) {
return;
+ }
floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException()) {
return;
+ }
}
impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
}
@@ -180,8 +184,9 @@ static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
double doubleArg;
{
doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
- if (exceptionState.throwIfNeeded())
+ if (exceptionState.hadException()) {
return;
+ }
}
impl->voidMethodPartialOverload(doubleArg);
}
@@ -206,7 +211,6 @@ static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
break;
}
exceptionState.throwTypeError("No function was found that matched the signature provided.");
- exceptionState.throwIfNeeded();
return;
}

Powered by Google App Engine
This is Rietveld 408576698