Index: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
index 0373cf19e12d993e43bd734011a8efc69c2885bb..a848ebf3e6c52acd2fd8c338ee06efd4ace687c9 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
@@ -61,7 +61,6 @@ static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterface5'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestInterfaceAttribute(cppValue); |
@@ -91,8 +90,9 @@ static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v |
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setDoubleAttribute(cppValue); |
} |
@@ -120,8 +120,9 @@ static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setFloatAttribute(cppValue); |
} |
@@ -149,8 +150,9 @@ static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va |
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDoubleAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setUnrestrictedDoubleAttribute(cppValue); |
} |
@@ -178,8 +180,9 @@ static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val |
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFloatAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setUnrestrictedFloatAttribute(cppValue); |
} |
@@ -202,8 +205,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; |
+ } |
TestInterface5Implementation::setStaticStringAttribute(cppValue); |
} |
@@ -231,8 +235,9 @@ static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setAlwaysExposedAttribute(cppValue); |
} |
@@ -260,8 +265,9 @@ static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setWorkerExposedAttribute(cppValue); |
} |
@@ -289,8 +295,9 @@ static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedAttribute", "TestInterface5", holder, info.GetIsolate()); |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
impl->setWindowExposedAttribute(cppValue); |
} |
@@ -328,7 +335,6 @@ static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
@@ -336,11 +342,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); |
} |
@@ -355,7 +363,6 @@ static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
@@ -363,11 +370,13 @@ static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: |
float unrestrictedFloatArg; |
{ |
unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
} |
impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleArg, unrestrictedFloatArg); |
} |
@@ -478,15 +487,15 @@ static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodBooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
BooleanOrString arg; |
{ |
V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
} |
impl->voidMethodBooleanOrDOMStringArg(arg); |
} |
@@ -501,15 +510,15 @@ static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
DoubleOrString arg; |
{ |
V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
} |
impl->voidMethodDoubleOrDOMStringArg(arg); |
} |
@@ -526,7 +535,6 @@ static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -544,7 +552,6 @@ static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -562,7 +569,6 @@ static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -578,7 +584,6 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "TestInterface5", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
@@ -587,7 +592,6 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
if (!info[0]->IsFunction()) { |
exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
@@ -596,7 +600,6 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()), callback, thisArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -624,7 +627,6 @@ static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
Iterator* result = impl->iterator(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -653,8 +655,9 @@ static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, |
{ |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
V8StringResource<> propertyValue = v8Value; |
- if (!propertyValue.prepare()) |
+ if (!propertyValue.prepare()) { |
return; |
+ } |
bool result = impl->anonymousIndexedSetter(index, propertyValue); |
if (!result) |
return; |
@@ -705,8 +708,9 @@ static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v |
if (!propertyName.prepare()) |
return; |
V8StringResource<> propertyValue = v8Value; |
- if (!propertyValue.prepare()) |
+ if (!propertyValue.prepare()) { |
return; |
+ } |
bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
if (!result) |
return; |
@@ -727,7 +731,7 @@ static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb |
v8::String::Utf8Value namedProperty(name); |
ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate()); |
bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (!result) |
return; |
@@ -763,7 +767,7 @@ static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i |
Vector<String> names; |
ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInterface5", info.Holder(), info.GetIsolate()); |
impl->namedPropertyEnumerator(names, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size()); |
for (size_t i = 0; i < names.size(); ++i) { |