Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
index b3bac0fd5d8d529da3438baccf9f22124b8b5ece..a3ccb7c53ff764b980d26a112e459f482fdfb78f 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
@@ -215,7 +215,7 @@ static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: |
ExceptionState exceptionState(ExceptionState::SetterContext, "dateAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
double cppValue = toCoreDate(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDateAttribute(cppValue); |
} |
@@ -272,7 +272,7 @@ static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setByteStringAttribute(cppValue); |
} |
@@ -301,7 +301,7 @@ static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons |
ExceptionState exceptionState(ExceptionState::SetterContext, "usvStringAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
V8StringResource<> cppValue = toUSVString(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUsvStringAttribute(cppValue); |
} |
@@ -330,7 +330,7 @@ static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c |
ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDomTimeStampAttribute(cppValue); |
} |
@@ -359,7 +359,7 @@ static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const |
ExceptionState exceptionState(ExceptionState::SetterContext, "booleanAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setBooleanAttribute(cppValue); |
} |
@@ -388,7 +388,7 @@ static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: |
ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt8(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setByteAttribute(cppValue); |
} |
@@ -417,7 +417,7 @@ static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v |
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDoubleAttribute(cppValue); |
} |
@@ -446,7 +446,7 @@ static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setFloatAttribute(cppValue); |
} |
@@ -475,7 +475,7 @@ static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: |
ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setLongAttribute(cppValue); |
} |
@@ -504,7 +504,7 @@ static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const |
ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
long long cppValue = toInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setLongLongAttribute(cppValue); |
} |
@@ -533,7 +533,7 @@ static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned cppValue = toUInt8(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setOctetAttribute(cppValue); |
} |
@@ -562,7 +562,7 @@ static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setShortAttribute(cppValue); |
} |
@@ -591,7 +591,7 @@ static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va |
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDoubleAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnrestrictedDoubleAttribute(cppValue); |
} |
@@ -620,7 +620,7 @@ static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val |
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFloatAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnrestrictedFloatAttribute(cppValue); |
} |
@@ -649,7 +649,7 @@ static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c |
ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnsignedLongAttribute(cppValue); |
} |
@@ -678,7 +678,7 @@ static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu |
ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnsignedLongLongAttribute(cppValue); |
} |
@@ -707,7 +707,7 @@ static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnsignedShortAttribute(cppValue); |
} |
@@ -738,7 +738,6 @@ static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va |
TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestInterfaceEmptyAttribute(cppValue); |
@@ -770,7 +769,6 @@ static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestObject'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestObjectAttribute(cppValue); |
@@ -852,7 +850,7 @@ static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setCSSAttribute(cppValue); |
} |
@@ -881,7 +879,7 @@ static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setIMEAttribute(cppValue); |
} |
@@ -910,7 +908,7 @@ static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setSVGAttribute(cppValue); |
} |
@@ -939,7 +937,7 @@ static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setXMLAttribute(cppValue); |
} |
@@ -994,7 +992,7 @@ static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v |
ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScriptValueAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
RefPtr<SerializedScriptValue> cppValue = SerializedScriptValue::serialize(info.GetIsolate(), v8Value, nullptr, nullptr, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setSerializedScriptValueAttribute(cppValue); |
} |
@@ -1077,7 +1075,6 @@ static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v |
DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Window'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setWindowAttribute(cppValue); |
@@ -1109,7 +1106,6 @@ static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const |
Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Document'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setDocumentAttribute(cppValue); |
@@ -1141,7 +1137,6 @@ static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu |
DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'DocumentFragment'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setDocumentFragmentAttribute(cppValue); |
@@ -1173,7 +1168,6 @@ static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c |
DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'DocumentType'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setDocumentTypeAttribute(cppValue); |
@@ -1205,7 +1199,6 @@ static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const |
Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Element'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setElementAttribute(cppValue); |
@@ -1237,7 +1230,6 @@ static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: |
Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Node'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setNodeAttribute(cppValue); |
@@ -1269,7 +1261,6 @@ static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'ShadowRoot'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setShadowRootAttribute(cppValue); |
@@ -1301,7 +1292,6 @@ static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co |
TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'ArrayBuffer'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setArrayBufferAttribute(cppValue); |
@@ -1333,7 +1323,6 @@ static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c |
DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toImpl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Float32Array'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setFloat32ArrayAttribute(cppValue); |
@@ -1365,7 +1354,6 @@ static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8::Local<v8::Uint8Array>::Cast(v8Value)) : 0; |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Uint8Array'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setUint8ArrayAttribute(cppValue); |
@@ -1467,7 +1455,7 @@ static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co |
ExceptionState exceptionState(ExceptionState::SetterContext, "stringArrayAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setStringArrayAttribute(cppValue); |
} |
@@ -1496,7 +1484,7 @@ static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> |
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceEmptyArrayAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setTestInterfaceEmptyArrayAttribute(cppValue); |
} |
@@ -1525,7 +1513,7 @@ static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
ExceptionState exceptionState(ExceptionState::SetterContext, "floatArrayAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
Vector<float> cppValue = toImplArray<Vector<float>>(v8Value, 0, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setFloatArrayAttribute(cppValue); |
} |
@@ -1554,7 +1542,7 @@ static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Val |
ExceptionState exceptionState(ExceptionState::SetterContext, "stringFrozenArrayAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setStringFrozenArrayAttribute(cppValue); |
} |
@@ -1583,7 +1571,7 @@ static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceEmptyFrozenArrayAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue); |
} |
@@ -1646,7 +1634,7 @@ static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setLongOrNullAttribute(cppValue); |
} |
@@ -1677,7 +1665,6 @@ static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V |
TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue && !isUndefinedOrNull(v8Value)) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestInterfaceOrNullAttribute(cppValue); |
@@ -1717,6 +1704,11 @@ static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const |
}; |
if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) { |
currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
+ // http://heycam.github.io/webidl/#idl-enums |
+ // Assignment of an invalid string value to an attribute is ignored, |
+ // while passing such a value as an operation argument results in |
+ // an exception being thrown. |
+ exceptionState.clearException(); |
return; |
} |
impl->setTestEnumAttribute(cppValue); |
@@ -1756,6 +1748,11 @@ static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
}; |
if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) { |
currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
+ // http://heycam.github.io/webidl/#idl-enums |
+ // Assignment of an invalid string value to an attribute is ignored, |
+ // while passing such a value as an operation argument results in |
+ // an exception being thrown. |
+ exceptionState.clearException(); |
return; |
} |
impl->setTestEnumOrNullAttribute(cppValue); |
@@ -1806,7 +1803,7 @@ static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con |
v8::Local<v8::Object> holder = info.Holder(); |
ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttribute", "TestObject", holder, info.GetIsolate()); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
TestObject::setStaticLongAttribute(cppValue); |
} |
@@ -1865,7 +1862,7 @@ static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
TestObject* impl = V8TestObject::toImpl(holder); |
DoubleOrString cppValue; |
V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDoubleOrStringAttribute(cppValue); |
} |
@@ -1897,7 +1894,7 @@ static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8 |
TestObject* impl = V8TestObject::toImpl(holder); |
DoubleOrString cppValue; |
V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::Nullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDoubleOrStringOrNullAttribute(cppValue); |
} |
@@ -1929,7 +1926,7 @@ static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va |
TestObject* impl = V8TestObject::toImpl(holder); |
DoubleOrString cppValue; |
V8DoubleOrNullOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::Nullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDoubleOrNullStringAttribute(cppValue); |
} |
@@ -1961,7 +1958,7 @@ static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value> |
TestObject* impl = V8TestObject::toImpl(holder); |
StringOrStringSequence cppValue; |
V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setStringOrStringSequenceAttribute(cppValue); |
} |
@@ -1993,7 +1990,7 @@ static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu |
TestObject* impl = V8TestObject::toImpl(holder); |
TestEnumOrDouble cppValue; |
V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setTestEnumOrDoubleAttribute(cppValue); |
} |
@@ -2025,7 +2022,7 @@ static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val |
TestObject* impl = V8TestObject::toImpl(holder); |
UnrestrictedDoubleOrString cppValue; |
V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnrestrictedDoubleOrStringAttribute(cppValue); |
} |
@@ -2058,7 +2055,7 @@ static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); |
} |
@@ -2096,7 +2093,7 @@ static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); |
} |
@@ -2125,7 +2122,7 @@ static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); |
} |
@@ -2208,7 +2205,7 @@ static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co |
ExceptionState exceptionState(ExceptionState::SetterContext, "cachedArrayAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setCachedArrayAttribute(cppValue); |
V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value. |
@@ -2353,7 +2350,6 @@ static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v |
ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityForNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); |
if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), exceptionState)) { |
v8SetReturnValueNull(info); |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), impl); |
@@ -2398,7 +2394,7 @@ static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu |
ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setCustomGetterLongAttribute(cppValue); |
} |
@@ -2463,7 +2459,7 @@ static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setDeprecatedLongAttribute(cppValue); |
} |
@@ -2493,7 +2489,7 @@ static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu |
ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, EnforceRange, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setEnforceRangeLongAttribute(cppValue); |
} |
@@ -2522,7 +2518,7 @@ static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val |
ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setImplementedAsName(cppValue); |
} |
@@ -2555,7 +2551,7 @@ static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterImplementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setImplementedAsNameWithCustomGetter(cppValue); |
} |
@@ -2603,7 +2599,7 @@ static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setMeasureAsLongAttribute(cppValue); |
} |
@@ -2633,7 +2629,7 @@ static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val |
ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setNotEnumerableLongAttribute(cppValue); |
} |
@@ -2662,7 +2658,7 @@ static void originTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> |
ExceptionState exceptionState(ExceptionState::SetterContext, "originTrialEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setOriginTrialEnabledLongAttribute(cppValue); |
} |
@@ -2733,7 +2729,7 @@ static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2771,7 +2767,7 @@ static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2809,7 +2805,7 @@ static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2843,7 +2839,7 @@ static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2876,7 +2872,7 @@ static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2909,7 +2905,7 @@ static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2942,7 +2938,7 @@ static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -2971,7 +2967,7 @@ static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA |
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
} |
@@ -3037,7 +3033,6 @@ static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c |
if (!cppValue.prepare()) |
return; |
impl->setHrefThrows(cppValue, exceptionState); |
- exceptionState.throwIfNeeded(); |
} |
static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -3099,7 +3094,7 @@ static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons |
if (!impl) |
return; |
V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setHrefByteString(cppValue); |
} |
@@ -3233,7 +3228,6 @@ static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value |
TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceGarbageCollected'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setAttr1(cppValue); |
@@ -3251,7 +3245,7 @@ static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba |
TestObject* impl = V8TestObject::toImpl(holder); |
ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
- if (UNLIKELY(exceptionState.throwIfNeeded())) |
+ if (UNLIKELY(exceptionState.hadException())) |
return; |
v8SetReturnValueInt(info, cppValue); |
} |
@@ -3267,10 +3261,9 @@ static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V |
ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); |
- exceptionState.throwIfNeeded(); |
} |
static void raisesExceptionLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -3285,7 +3278,7 @@ static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Function |
TestObject* impl = V8TestObject::toImpl(holder); |
ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); |
- if (UNLIKELY(exceptionState.throwIfNeeded())) |
+ if (UNLIKELY(exceptionState.hadException())) |
return; |
v8SetReturnValueInt(info, cppValue); |
} |
@@ -3301,7 +3294,7 @@ static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu |
ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setRaisesExceptionGetterLongAttribute(cppValue); |
} |
@@ -3330,10 +3323,9 @@ static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu |
ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); |
- exceptionState.throwIfNeeded(); |
} |
static void setterRaisesExceptionLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -3348,7 +3340,7 @@ static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8:: |
TestObject* impl = V8TestObject::toImpl(holder); |
ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
TestInterfaceEmpty* cppValue(impl->raisesExceptionTestInterfaceEmptyAttribute(exceptionState)); |
- if (UNLIKELY(exceptionState.throwIfNeeded())) |
+ if (UNLIKELY(exceptionState.hadException())) |
return; |
v8SetReturnValueFast(info, cppValue, impl); |
} |
@@ -3366,11 +3358,9 @@ static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local< |
TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setRaisesExceptionTestInterfaceEmptyAttribute(cppValue, exceptionState); |
- exceptionState.throwIfNeeded(); |
} |
static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -3393,7 +3383,7 @@ static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons |
} |
ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState)); |
- if (UNLIKELY(exceptionState.throwIfNeeded())) |
+ if (UNLIKELY(exceptionState.hadException())) |
return; |
v8::Local<v8::Value> v8Value(cppValue.v8Value()); |
V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName, v8Value); |
@@ -3412,7 +3402,6 @@ static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8:: |
TestObject* impl = V8TestObject::toImpl(holder); |
ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value); |
impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionState); |
- exceptionState.throwIfNeeded(); |
V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Invalidate the cached value. |
} |
@@ -3442,7 +3431,6 @@ static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8 |
TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
@@ -3476,7 +3464,6 @@ static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local< |
TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
@@ -3508,7 +3495,7 @@ static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
ExceptionState exceptionState(ExceptionState::SetterContext, "reflectBooleanAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); |
@@ -3539,7 +3526,7 @@ static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co |
ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); |
@@ -3570,7 +3557,7 @@ static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedShortAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
@@ -3601,7 +3588,7 @@ static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V |
ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr, cppValue); |
@@ -4121,7 +4108,7 @@ static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va |
ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setRuntimeEnabledLongAttribute(cppValue); |
} |
@@ -4263,7 +4250,7 @@ static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8::Local<v |
ExceptionState exceptionState(ExceptionState::SetterContext, "legacyInterfaceTypeCheckingFloatAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setLegacyInterfaceTypeCheckingFloatAttribute(cppValue); |
} |
@@ -4404,7 +4391,7 @@ static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value |
ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnforgeableLongAttribute(cppValue); |
} |
@@ -4434,7 +4421,7 @@ static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c |
ExceptionState exceptionState(ExceptionState::SetterContext, "measuredLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setMeasuredLongAttribute(cppValue); |
} |
@@ -4516,7 +4503,7 @@ static void unscopeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value |
ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnscopeableLongAttribute(cppValue); |
} |
@@ -4545,7 +4532,7 @@ static void unscopeableOriginTrialEnabledLongAttributeAttributeSetter(v8::Local< |
ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableOriginTrialEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnscopeableOriginTrialEnabledLongAttribute(cppValue); |
} |
@@ -4574,7 +4561,7 @@ static void unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8:: |
ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
impl->setUnscopeableRuntimeEnabledLongAttribute(cppValue); |
} |
@@ -4605,7 +4592,6 @@ static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestInterfaceAttribute(cppValue); |
@@ -4637,7 +4623,6 @@ static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8:: |
TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceGarbageCollected'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestInterfaceGarbageCollectedAttribute(cppValue); |
@@ -4669,7 +4654,6 @@ static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca |
TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue && !isUndefinedOrNull(v8Value)) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceGarbageCollected'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->setTestInterfaceGarbageCollectedOrNullAttribute(cppValue); |
@@ -4717,7 +4701,7 @@ static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 |
ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute", "TestObject", holder, info.GetIsolate()); |
TestObject* impl = V8TestObject::toImpl(holder); |
int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
} |
@@ -4782,7 +4766,6 @@ static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: |
Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'Node'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
@@ -4853,6 +4836,11 @@ static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co |
}; |
if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) { |
currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
+ // http://heycam.github.io/webidl/#idl-enums |
+ // Assignment of an invalid string value to an attribute is ignored, |
+ // while passing such a value as an operation argument results in |
+ // an exception being thrown. |
+ exceptionState.clearException(); |
return; |
} |
V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
@@ -5088,14 +5076,13 @@ static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDateArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
double dateArg; |
{ |
dateArg = toCoreDate(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDateArg(dateArg); |
@@ -5132,14 +5119,13 @@ static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
V8StringResource<> stringArg; |
{ |
stringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodByteStringArg(stringArg); |
@@ -5155,14 +5141,13 @@ static void voidMethodUSVStringArgMethod(const v8::FunctionCallbackInfo<v8::Valu |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUSVStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
V8StringResource<> usvStringArg; |
{ |
usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodUSVStringArg(usvStringArg); |
@@ -5178,14 +5163,13 @@ static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDOMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned long long domTimeStampArg; |
{ |
domTimeStampArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDOMTimeStampArg(domTimeStampArg); |
@@ -5201,14 +5185,13 @@ static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value> |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
bool booleanArg; |
{ |
booleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodBooleanArg(booleanArg); |
@@ -5224,14 +5207,13 @@ static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int byteArg; |
{ |
byteArg = toInt8(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodByteArg(byteArg); |
@@ -5247,14 +5229,13 @@ static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
double doubleArg; |
{ |
doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDoubleArg(doubleArg); |
@@ -5270,14 +5251,13 @@ static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodFloatArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
float floatArg; |
{ |
floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodFloatArg(floatArg); |
@@ -5293,14 +5273,13 @@ static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodLongArg(longArg); |
@@ -5316,14 +5295,13 @@ static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
long long longLongArg; |
{ |
longLongArg = toInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodLongLongArg(longLongArg); |
@@ -5339,14 +5317,13 @@ static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOctetArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned octetArg; |
{ |
octetArg = toUInt8(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodOctetArg(octetArg); |
@@ -5362,14 +5339,13 @@ static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int shortArg; |
{ |
shortArg = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodShortArg(shortArg); |
@@ -5385,14 +5361,13 @@ static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned unsignedLongArg; |
{ |
unsignedLongArg = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodUnsignedLongArg(unsignedLongArg); |
@@ -5408,14 +5383,13 @@ static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned long long unsignedLongLongArg; |
{ |
unsignedLongLongArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); |
@@ -5431,14 +5405,13 @@ static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8:: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned unsignedShortArg; |
{ |
unsignedShortArg = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodUnsignedShortArg(unsignedShortArg); |
@@ -5488,7 +5461,6 @@ static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -5496,12 +5468,11 @@ static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb |
TestInterfaceEmpty* testInterfaceEmptyArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
if (!testInterfaceEmptyArg) { |
exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -6078,14 +6049,13 @@ static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<int> arrayLongArg; |
{ |
arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodArrayLongArg(arrayLongArg); |
@@ -6101,14 +6071,13 @@ static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<String> arrayStringArg; |
{ |
arrayStringArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodArrayStringArg(arrayStringArg); |
@@ -6124,14 +6093,13 @@ static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; |
{ |
arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); |
@@ -6147,7 +6115,6 @@ static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo< |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodNullableArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -6155,7 +6122,7 @@ static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo< |
{ |
if (!isUndefinedOrNull(info[0])) { |
arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
} |
@@ -6205,14 +6172,13 @@ static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<int> longSequenceArg; |
{ |
longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodSequenceLongArg(longSequenceArg); |
@@ -6228,14 +6194,13 @@ static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<String> stringSequenceArg; |
{ |
stringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodSequenceStringArg(stringSequenceArg); |
@@ -6251,14 +6216,13 @@ static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; |
{ |
testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg); |
@@ -6274,14 +6238,13 @@ static void voidMethodSequenceSequenceDOMStringArgMethod(const v8::FunctionCallb |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceSequenceDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<Vector<String>> stringSequenceSequenceArg; |
{ |
stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodSequenceSequenceDOMStringArg(stringSequenceSequenceArg); |
@@ -6297,7 +6260,6 @@ static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackIn |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodNullableSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -6305,7 +6267,7 @@ static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackIn |
{ |
if (!isUndefinedOrNull(info[0])) { |
longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
} |
@@ -6333,14 +6295,13 @@ static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackIn |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<String> stringFrozenArrayArg; |
{ |
stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg); |
@@ -6356,14 +6317,13 @@ static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::Functi |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg; |
{ |
testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozenArrayArg); |
@@ -6470,14 +6430,13 @@ static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::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); |
@@ -6493,14 +6452,13 @@ static void voidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbac |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrDOMStringOrNullArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
DoubleOrString arg; |
{ |
V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::Nullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDoubleOrDOMStringOrNullArg(arg); |
@@ -6516,14 +6474,13 @@ static void voidMethodDoubleOrNullOrDOMStringArgMethod(const v8::FunctionCallbac |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrNullOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
DoubleOrString arg; |
{ |
V8DoubleOrNullOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::Nullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDoubleOrNullOrDOMStringArg(arg); |
@@ -6539,14 +6496,13 @@ static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(const v8: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
StringOrArrayBufferOrArrayBufferView arg; |
{ |
V8StringOrArrayBufferOrArrayBufferView::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg(arg); |
@@ -6562,14 +6518,13 @@ static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(const v8 |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
ArrayBufferOrArrayBufferViewOrDictionary arg; |
{ |
V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg(arg); |
@@ -6587,7 +6542,7 @@ static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallba |
HeapVector<DoubleOrString> arg; |
{ |
arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodArrayOfDoubleOrDOMStringArg(arg); |
@@ -6706,7 +6661,6 @@ static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestEnumArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -6722,7 +6676,6 @@ static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value |
"EnumValue3", |
}; |
if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -6781,7 +6734,7 @@ static void passPermissiveDictionaryMethodMethod(const v8::FunctionCallbackInfo< |
TestDictionary arg; |
{ |
V8TestDictionary::toImpl(info.GetIsolate(), info[0], arg, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->passPermissiveDictionaryMethod(arg); |
@@ -6807,6 +6760,7 @@ static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value> |
{ |
if (UNLIKELY(info.Length() < 3)) { |
setMinimumArityTypeError(exceptionState, 3, info.Length()); |
+ v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -6820,6 +6774,7 @@ static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value> |
return; |
if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
exceptionState.throwTypeError("parameter 2 ('arg2') is not an object."); |
+ v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
} |
arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState); |
@@ -6852,6 +6807,7 @@ static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa |
{ |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
+ v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -6859,6 +6815,7 @@ static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa |
{ |
if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
exceptionState.throwTypeError("parameter 1 ('arg1') is not an object."); |
+ v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
} |
arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState); |
@@ -6908,7 +6865,6 @@ static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -6916,11 +6872,10 @@ static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val |
{ |
if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not an object."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDictionaryArg(dictionaryArg); |
@@ -6978,14 +6933,13 @@ static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSerializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
RefPtr<SerializedScriptValue> serializedScriptValueArg; |
{ |
serializedScriptValueArg = SerializedScriptValue::serialize(info.GetIsolate(), info[0], nullptr, nullptr, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); |
@@ -7024,14 +6978,13 @@ static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
Vector<Dictionary> dictionarySequenceArg; |
{ |
dictionarySequenceArg = toImplArray<Vector<Dictionary>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); |
@@ -7047,7 +7000,6 @@ static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7058,7 +7010,7 @@ static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: |
if (!stringArg.prepare()) |
return; |
longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodStringArgLongArg(stringArg, longArg); |
@@ -7142,7 +7094,7 @@ static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V |
return; |
} |
optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodOptionalLongArg(optionalLongArg); |
@@ -7170,7 +7122,7 @@ static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8: |
return; |
} |
optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongArg), info.GetIsolate()); |
@@ -7198,7 +7150,7 @@ static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall |
return; |
} |
optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optionalLongArg)); |
@@ -7226,7 +7178,7 @@ static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V |
return; |
} |
optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); |
@@ -7242,7 +7194,6 @@ static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7256,14 +7207,14 @@ static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf |
--numArgsPassed; |
} |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (UNLIKELY(numArgsPassed <= 1)) { |
impl->voidMethodLongArgOptionalLongArg(longArg); |
return; |
} |
optionalLongArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); |
@@ -7279,7 +7230,6 @@ static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7294,21 +7244,21 @@ static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func |
--numArgsPassed; |
} |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (UNLIKELY(numArgsPassed <= 1)) { |
impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); |
return; |
} |
optionalLongArg1 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (UNLIKELY(numArgsPassed <= 2)) { |
impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1); |
return; |
} |
optionalLongArg2 = toInt32(info.GetIsolate(), info[2], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1, optionalLongArg2); |
@@ -7324,7 +7274,6 @@ static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7338,7 +7287,7 @@ static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct |
--numArgsPassed; |
} |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (UNLIKELY(numArgsPassed <= 1)) { |
impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); |
@@ -7347,7 +7296,6 @@ static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct |
optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
if (!optionalTestInterfaceEmpty) { |
exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -7364,7 +7312,6 @@ static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7380,7 +7327,6 @@ static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct |
optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
if (!optionalTestInterfaceEmpty) { |
exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
if (UNLIKELY(numArgsPassed <= 1)) { |
@@ -7388,7 +7334,7 @@ static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct |
return; |
} |
longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty, longArg); |
@@ -7407,11 +7353,10 @@ static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo |
{ |
if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
exceptionState.throwTypeError("parameter 1 ('optionalDictionaryArg') is not an object."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
optionalDictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); |
@@ -7430,7 +7375,7 @@ static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo< |
{ |
if (!info[0]->IsUndefined()) { |
defaultByteStringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultByteStringArg = String("foo"); |
@@ -7475,21 +7420,21 @@ static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8 |
{ |
if (!info[0]->IsUndefined()) { |
defaultLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultLongArg = 10; |
} |
if (!info[1]->IsUndefined()) { |
defaultLongLongArg = toInt64(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultLongLongArg = -10; |
} |
if (!info[2]->IsUndefined()) { |
defaultUnsignedArg = toUInt32(info.GetIsolate(), info[2], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultUnsignedArg = 4294967295u; |
@@ -7511,7 +7456,7 @@ static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8:: |
{ |
if (!info[0]->IsUndefined()) { |
defaultDoubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultDoubleArg = 0.5; |
@@ -7533,7 +7478,7 @@ static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo |
{ |
if (!info[0]->IsUndefined()) { |
defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultBooleanArg = true; |
@@ -7555,7 +7500,7 @@ static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf |
{ |
if (!info[0]->IsUndefined()) { |
defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultBooleanArg = false; |
@@ -7577,7 +7522,7 @@ static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb |
{ |
if (!info[0]->IsUndefined()) { |
defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultStringArg = nullptr; |
@@ -7645,21 +7590,21 @@ static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallback |
{ |
if (!info[0]->IsUndefined()) { |
V8DoubleOrString::toImpl(info.GetIsolate(), info[0], defaultLongArg, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultLongArg.setDouble(10); |
} |
if (!info[1]->IsUndefined()) { |
V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), info[1], defaultStringArg, UnionTypeConversionMode::Nullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
defaultStringArg.setString(String("foo")); |
} |
if (!info[2]->IsUndefined()) { |
V8DoubleOrString::toImpl(info.GetIsolate(), info[2], defaultNullArg, UnionTypeConversionMode::Nullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
/* null default value */; |
@@ -7681,7 +7626,7 @@ static void voidMethodDefaultStringSequenceArgMethod(const v8::FunctionCallbackI |
{ |
if (!info[0]->IsUndefined()) { |
defaultStringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} else { |
/* Nothing to do */; |
@@ -7702,7 +7647,7 @@ static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8: |
Vector<String> variadicStringArgs; |
{ |
variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodVariadicStringArg(variadicStringArgs); |
@@ -7718,7 +7663,6 @@ static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgVariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7729,7 +7673,7 @@ static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac |
if (!stringArg.prepare()) |
return; |
variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); |
@@ -7749,7 +7693,6 @@ static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall |
for (int i = 0; i < info.Length(); ++i) { |
if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { |
exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
@@ -7768,7 +7711,6 @@ static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -7778,13 +7720,11 @@ static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c |
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
if (!testInterfaceEmptyArg) { |
exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
for (int i = 1; i < info.Length(); ++i) { |
if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { |
exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
@@ -7807,7 +7747,6 @@ static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F |
for (int i = 0; i < info.Length(); ++i) { |
if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetIsolate())) { |
exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceGarbageCollected'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarbageCollected::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
@@ -7828,7 +7767,7 @@ static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodA(longArg); |
@@ -7842,10 +7781,10 @@ static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg2; |
{ |
longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodA(longArg1, longArg2); |
@@ -7872,11 +7811,9 @@ static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -7892,7 +7829,7 @@ static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodB(longArg); |
@@ -7919,7 +7856,7 @@ static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& |
return; |
} |
longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodB(stringArg, longArg); |
@@ -7954,11 +7891,9 @@ static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -7974,7 +7909,7 @@ static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodC(longArg); |
@@ -8013,11 +7948,9 @@ static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8033,7 +7966,7 @@ static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodD(longArg); |
@@ -8046,7 +7979,7 @@ static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& |
Vector<int> longArrayArg; |
{ |
longArrayArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodD(longArrayArg); |
@@ -8071,11 +8004,9 @@ static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8091,7 +8022,7 @@ static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodE(longArg); |
@@ -8134,11 +8065,9 @@ static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8176,7 +8105,7 @@ static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& |
double doubleArg; |
{ |
doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodF(doubleArg); |
@@ -8214,7 +8143,6 @@ static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8230,7 +8158,7 @@ static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodG(longArg); |
@@ -8286,7 +8214,6 @@ static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8342,11 +8269,9 @@ static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8374,7 +8299,7 @@ static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>& |
double doubleArg; |
{ |
doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodI(doubleArg); |
@@ -8403,11 +8328,9 @@ static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8436,11 +8359,10 @@ static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& |
{ |
if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodJ(testDictionaryArg); |
@@ -8465,11 +8387,9 @@ static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8523,11 +8443,9 @@ static void overloadedMethodKMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8544,10 +8462,10 @@ static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>& |
Vector<ScriptValue> restArgs; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodL(longArg, restArgs); |
@@ -8564,7 +8482,7 @@ static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>& |
if (!stringArg.prepare()) |
return; |
restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedMethodL(stringArg, restArgs); |
@@ -8607,11 +8525,9 @@ static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8667,11 +8583,9 @@ static void overloadedMethodNMethod(const v8::FunctionCallbackInfo<v8::Value>& i |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8695,6 +8609,7 @@ static void promiseOverloadMethod2MethodPromise(const v8::FunctionCallbackInfo<v |
arg1 = toDOMWindow(info.GetIsolate(), info[0]); |
if (!arg1) { |
exceptionState.throwTypeError("parameter 1 is not of type 'Window'."); |
+ v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
} |
arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); |
@@ -8721,6 +8636,7 @@ static void promiseOverloadMethod3MethodPromise(const v8::FunctionCallbackInfo<v |
arg1 = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
if (!arg1) { |
exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
+ v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
} |
arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); |
@@ -8795,7 +8711,7 @@ static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedPerWorldBindingsMethod(longArg); |
@@ -8821,7 +8737,6 @@ static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8837,7 +8752,7 @@ static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->overloadedPerWorldBindingsMethod(longArg); |
@@ -8863,7 +8778,6 @@ static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8878,7 +8792,7 @@ static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
TestObject::overloadedStaticMethod(longArg); |
@@ -8891,10 +8805,10 @@ static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val |
int longArg2; |
{ |
longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
TestObject::overloadedStaticMethod(longArg1, longArg2); |
@@ -8921,11 +8835,9 @@ static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -8939,14 +8851,13 @@ static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned index; |
{ |
index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
@@ -8964,7 +8875,6 @@ static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -8972,7 +8882,7 @@ static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
V8StringResource<> value; |
{ |
index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
value = info[1]; |
if (!value.prepare()) |
@@ -8993,14 +8903,13 @@ static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned clampUnsignedShortArg; |
{ |
clampUnsignedShortArg = toUInt16(info.GetIsolate(), info[0], Clamp, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); |
@@ -9016,14 +8925,13 @@ static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo< |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
unsigned clampUnsignedLongArg; |
{ |
clampUnsignedLongArg = toUInt32(info.GetIsolate(), info[0], Clamp, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); |
@@ -9060,7 +8968,7 @@ static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn |
int defaultUndefinedLongArg; |
{ |
defaultUndefinedLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); |
@@ -9093,14 +9001,13 @@ static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEnforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int enforceRangeLongArg; |
{ |
enforceRangeLongArg = toInt32(info.GetIsolate(), info[0], EnforceRange, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); |
@@ -9274,7 +9181,7 @@ static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod |
return; |
} |
optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
@@ -9326,7 +9233,6 @@ static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo< |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl->checkSecurityForNodeVoidMethod(), exceptionState)) { |
v8SetReturnValueNull(info); |
- exceptionState.throwIfNeeded(); |
return; |
} |
impl->checkSecurityForNodeVoidMethod(); |
@@ -9438,7 +9344,7 @@ static void measureOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Va |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->measureOverloadedMethod(arg); |
@@ -9466,7 +9372,6 @@ static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Val |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9488,7 +9393,7 @@ static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8 |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->DeprecateAsOverloadedMethod(arg); |
@@ -9516,7 +9421,6 @@ static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8: |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9538,7 +9442,7 @@ static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->DeprecateAsSameValueOverloadedMethod(arg); |
@@ -9565,7 +9469,6 @@ static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9587,7 +9490,7 @@ static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8:: |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->measureAsOverloadedMethod(arg); |
@@ -9615,7 +9518,6 @@ static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9637,7 +9539,7 @@ static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->measureAsSameValueOverloadedMethod(arg); |
@@ -9665,7 +9567,6 @@ static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9687,7 +9588,7 @@ static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); |
@@ -9717,7 +9618,6 @@ static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9739,7 +9639,7 @@ static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); |
@@ -9768,7 +9668,6 @@ static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9790,7 +9689,7 @@ static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const |
int arg; |
{ |
arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); |
@@ -9819,7 +9718,6 @@ static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v |
break; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -9945,24 +9843,21 @@ void postMessageImpl(const char* interfaceName, TestObject* instance, const v8:: |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", interfaceName, info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
Transferables transferables; |
if (info.Length() > 1) { |
const int transferablesArgIndex = 1; |
if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
RefPtr<SerializedScriptValue> message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], &transferables, nullptr, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
// FIXME: Only pass context/exceptionState if instance really requires it. |
ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
instance->postMessage(context, message.release(), transferables.messagePorts, exceptionState); |
- exceptionState.throwIfNeeded(); |
} |
static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
@@ -10041,7 +9936,6 @@ static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
impl->raisesExceptionVoidMethod(exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10057,7 +9951,6 @@ static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8: |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
String result = impl->raisesExceptionStringMethod(exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValueString(info, result, info.GetIsolate()); |
@@ -10083,18 +9976,16 @@ static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal |
if (UNLIKELY(numArgsPassed <= 0)) { |
impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
return; |
} |
optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10109,7 +10000,6 @@ static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -10117,14 +10007,12 @@ static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu |
{ |
if (info.Length() <= 0 || !info[0]->IsFunction()) { |
exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
} |
impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10143,7 +10031,6 @@ static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons |
if (!isUndefinedOrNull(info[0])) { |
if (!info[0]->IsFunction()) { |
exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
@@ -10153,7 +10040,6 @@ static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons |
} |
impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10169,7 +10055,6 @@ static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMethod(exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -10186,7 +10071,6 @@ static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -10202,20 +10086,18 @@ static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExecutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionContext, longArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10277,7 +10159,7 @@ static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback |
int longArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->runtimeEnabledOverloadedVoidMethod(longArg); |
@@ -10306,11 +10188,9 @@ static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI |
} |
if (info.Length() < 1) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -10353,7 +10233,7 @@ static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio |
V8StringResource<> stringArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
stringArg = info[1]; |
if (!stringArg.prepare()) |
@@ -10371,7 +10251,7 @@ static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::Functio |
TestInterfaceImplementation* testInterfaceArg; |
{ |
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
stringArg = info[1]; |
if (!stringArg.prepare()) |
@@ -10379,7 +10259,6 @@ static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::Functio |
testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[2]); |
if (!testInterfaceArg) { |
exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10442,11 +10321,9 @@ static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function |
} |
if (info.Length() < TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength()) { |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No function was found that matched the signature provided."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
@@ -10483,7 +10360,6 @@ static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe |
for (int i = 0; i < info.Length(); ++i) { |
if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { |
exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
@@ -10610,14 +10486,13 @@ static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollectedSequenceArg; |
{ |
testInterfaceGarbageCollectedSequenceArg = (toMemberNativeArray<TestInterfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbageCollectedSequenceArg); |
@@ -10633,14 +10508,13 @@ static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollectedArrayArg; |
{ |
testInterfaceGarbageCollectedArrayArg = (toMemberNativeArray<TestInterfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCollectedArrayArg); |
@@ -10707,14 +10581,13 @@ static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethodWithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int value; |
{ |
value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
int result = 0; |
@@ -10783,7 +10656,6 @@ static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodWithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 5)) { |
setMinimumArityTypeError(exceptionState, 5, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -10796,20 +10668,18 @@ static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const |
document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
if (!document) { |
exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
if (!node) { |
exceptionState.throwTypeError("parameter 2 is not of type 'Node'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
string = info[4]; |
if (!string.prepare()) |
@@ -10831,7 +10701,6 @@ static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImplementedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -10839,10 +10708,10 @@ static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC |
int value2; |
{ |
value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(value1, value2)); |
@@ -10860,7 +10729,6 @@ static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -10878,7 +10746,6 @@ static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -10896,7 +10763,6 @@ static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -10912,7 +10778,6 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -10921,7 +10786,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]); |
@@ -10930,7 +10794,6 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()), callback, thisArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -10945,20 +10808,18 @@ static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int key; |
{ |
key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
bool result = impl->hasForBinding(scriptState, key, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValueBool(info, result); |
@@ -10974,20 +10835,18 @@ static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "get", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int key; |
{ |
key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
ScriptValue result = impl->getForBinding(scriptState, key, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result.v8Value()); |
@@ -11005,7 +10864,6 @@ static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
impl->clearForBinding(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -11020,20 +10878,18 @@ static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
int key; |
{ |
key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
bool result = impl->deleteForBinding(scriptState, key, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValueBool(info, result); |
@@ -11049,7 +10905,6 @@ static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "set", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
setMinimumArityTypeError(exceptionState, 2, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -11057,16 +10912,15 @@ static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
StringOrDouble value; |
{ |
key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeConversionMode::NotNullable, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
} |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
TestObject* result = impl->setForBinding(scriptState, key, value, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -11106,7 +10960,6 @@ static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
ScriptState* scriptState = ScriptState::forReceiverObject(info); |
Iterator* result = impl->iterator(scriptState, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, result); |
@@ -11156,7 +11009,7 @@ static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf |
ExceptionState exceptionState(ExceptionState::IndexedDeletionContext, "TestObject", info.Holder(), info.GetIsolate()); |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
DeleteResult result = impl->anonymousIndexedDeleter(scriptState, index, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (result != DeleteUnknownProperty) |
return v8SetReturnValueBool(info, result == DeleteSuccess); |
@@ -11218,7 +11071,7 @@ static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb |
ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestObject", info.Holder(), info.GetIsolate()); |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
bool result = impl->namedPropertyQuery(scriptState, propertyName, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return; |
if (!result) |
return; |
@@ -11255,7 +11108,7 @@ static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i |
Vector<String> names; |
ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObject", 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) { |
@@ -11979,7 +11832,7 @@ bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo |
if (v8Value.IsEmpty()) |
return false; |
int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return false; |
*result = cppValue; |
RELEASE_ASSERT(!exceptionState.hadException()); |
@@ -12011,7 +11864,7 @@ bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva |
if (v8Value.IsEmpty()) |
return false; |
int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return false; |
*result = cppValue; |
RELEASE_ASSERT(!exceptionState.hadException()); |
@@ -12140,7 +11993,7 @@ bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f |
if (v8Value.IsEmpty()) |
return false; |
int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return false; |
*result = cppValue; |
RELEASE_ASSERT(!exceptionState.hadException()); |
@@ -12170,7 +12023,7 @@ bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra |
if (v8Value.IsEmpty()) |
return false; |
int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return false; |
RELEASE_ASSERT(!exceptionState.hadException()); |
*result = cppValue; |
@@ -12200,7 +12053,7 @@ bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* fram |
if (v8Value.IsEmpty()) |
return false; |
int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) |
return false; |
RELEASE_ASSERT(!exceptionState.hadException()); |
*result = cppValue; |