| 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 9748a0e108292ef9a46da9edb3eee46ee4f152eb..191e22ddd3e509240c50b52488446630899889b1 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| @@ -155,8 +155,9 @@ static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setStringifierAttribute(cppValue);
|
| }
|
|
|
| @@ -252,8 +253,9 @@ static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setStringAttribute(cppValue);
|
| }
|
|
|
| @@ -281,8 +283,9 @@ 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);
|
| }
|
|
|
| @@ -310,8 +313,9 @@ 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);
|
| }
|
|
|
| @@ -339,8 +343,9 @@ 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);
|
| }
|
|
|
| @@ -368,8 +373,9 @@ 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);
|
| }
|
|
|
| @@ -397,8 +403,9 @@ 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);
|
| }
|
|
|
| @@ -426,8 +433,9 @@ 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);
|
| }
|
|
|
| @@ -455,8 +463,9 @@ 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);
|
| }
|
|
|
| @@ -484,8 +493,9 @@ 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);
|
| }
|
|
|
| @@ -513,8 +523,9 @@ 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);
|
| }
|
|
|
| @@ -542,8 +553,9 @@ 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);
|
| }
|
|
|
| @@ -571,8 +583,9 @@ 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);
|
| }
|
|
|
| @@ -600,8 +613,9 @@ 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);
|
| }
|
|
|
| @@ -629,8 +643,9 @@ 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);
|
| }
|
|
|
| @@ -658,8 +673,9 @@ 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);
|
| }
|
|
|
| @@ -687,8 +703,9 @@ 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);
|
| }
|
|
|
| @@ -716,8 +733,9 @@ 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);
|
| }
|
|
|
| @@ -747,7 +765,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);
|
| @@ -779,7 +796,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);
|
| @@ -861,8 +877,9 @@ 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);
|
| }
|
|
|
| @@ -890,8 +907,9 @@ 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);
|
| }
|
|
|
| @@ -919,8 +937,9 @@ 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);
|
| }
|
|
|
| @@ -948,8 +967,9 @@ 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);
|
| }
|
|
|
| @@ -1003,8 +1023,9 @@ 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);
|
| }
|
|
|
| @@ -1086,7 +1107,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);
|
| @@ -1118,7 +1138,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);
|
| @@ -1150,7 +1169,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);
|
| @@ -1182,7 +1200,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);
|
| @@ -1214,7 +1231,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);
|
| @@ -1246,7 +1262,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);
|
| @@ -1278,7 +1293,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);
|
| @@ -1310,7 +1324,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);
|
| @@ -1342,7 +1355,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);
|
| @@ -1374,7 +1386,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);
|
| @@ -1476,8 +1487,9 @@ 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);
|
| }
|
|
|
| @@ -1505,8 +1517,9 @@ 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);
|
| }
|
|
|
| @@ -1534,8 +1547,9 @@ 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);
|
| }
|
|
|
| @@ -1563,8 +1577,9 @@ 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);
|
| }
|
|
|
| @@ -1592,8 +1607,9 @@ 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);
|
| }
|
|
|
| @@ -1620,8 +1636,9 @@ static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setStringOrNullAttribute(cppValue);
|
| }
|
|
|
| @@ -1655,8 +1672,9 @@ 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);
|
| }
|
|
|
| @@ -1686,7 +1704,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);
|
| @@ -1716,8 +1733,9 @@ static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
|
| ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumAttribute", "TestObject", holder, info.GetIsolate());
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| const char* validValues[] = {
|
| "",
|
| "EnumValue1",
|
| @@ -1755,8 +1773,9 @@ static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
|
| ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrNullAttribute", "TestObject", holder, info.GetIsolate());
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| const char* validValues[] = {
|
| "",
|
| "EnumValue1",
|
| @@ -1789,8 +1808,9 @@ static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb
|
| static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| TestObject::setStaticStringAttribute(cppValue);
|
| }
|
|
|
| @@ -1815,8 +1835,9 @@ 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);
|
| }
|
|
|
| @@ -1874,8 +1895,9 @@ 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);
|
| }
|
|
|
| @@ -1906,8 +1928,9 @@ 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);
|
| }
|
|
|
| @@ -1938,8 +1961,9 @@ 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);
|
| }
|
|
|
| @@ -1970,8 +1994,9 @@ 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);
|
| }
|
|
|
| @@ -2002,8 +2027,9 @@ 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);
|
| }
|
|
|
| @@ -2034,8 +2060,9 @@ 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);
|
| }
|
|
|
| @@ -2067,8 +2094,9 @@ 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);
|
| }
|
|
|
| @@ -2105,8 +2133,9 @@ 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);
|
| }
|
|
|
| @@ -2134,8 +2163,9 @@ 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);
|
| }
|
|
|
| @@ -2217,8 +2247,9 @@ 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.
|
| }
|
| @@ -2257,8 +2288,9 @@ static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setCachedStringOrNoneAttribute(cppValue);
|
| V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached value.
|
| }
|
| @@ -2362,7 +2394,6 @@ static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
|
| ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityForNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate());
|
| if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), exceptionState)) {
|
| v8SetReturnValueNull(info);
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), impl);
|
| @@ -2407,8 +2438,9 @@ 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);
|
| }
|
|
|
| @@ -2472,8 +2504,9 @@ 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);
|
| }
|
|
|
| @@ -2502,8 +2535,9 @@ 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);
|
| }
|
|
|
| @@ -2531,8 +2565,9 @@ 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);
|
| }
|
|
|
| @@ -2564,8 +2599,9 @@ 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);
|
| }
|
|
|
| @@ -2612,8 +2648,9 @@ 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);
|
| }
|
|
|
| @@ -2642,8 +2679,9 @@ 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);
|
| }
|
|
|
| @@ -2671,8 +2709,9 @@ 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);
|
| }
|
|
|
| @@ -2742,8 +2781,9 @@ 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);
|
| }
|
|
|
| @@ -2780,8 +2820,9 @@ 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);
|
| }
|
|
|
| @@ -2818,8 +2859,9 @@ 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);
|
| }
|
|
|
| @@ -2852,8 +2894,9 @@ 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);
|
| }
|
|
|
| @@ -2885,8 +2928,9 @@ 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);
|
| }
|
|
|
| @@ -2918,8 +2962,9 @@ 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);
|
| }
|
|
|
| @@ -2951,8 +2996,9 @@ 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);
|
| }
|
|
|
| @@ -2980,8 +3026,9 @@ 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);
|
| }
|
|
|
| @@ -3011,8 +3058,9 @@ static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setHref(cppValue);
|
| }
|
|
|
| @@ -3043,10 +3091,10 @@ static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setHrefThrows(cppValue, exceptionState);
|
| - exceptionState.throwIfNeeded();
|
| }
|
|
|
| static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| @@ -3075,8 +3123,9 @@ static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| impl->setHrefCallWith(executionContext, currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
|
| }
|
| @@ -3108,8 +3157,9 @@ 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);
|
| }
|
|
|
| @@ -3139,8 +3189,9 @@ static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setHref(cppValue);
|
| }
|
|
|
| @@ -3170,8 +3221,9 @@ static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setHref(cppValue);
|
| }
|
|
|
| @@ -3201,8 +3253,9 @@ static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Val
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setHref(cppValue);
|
| }
|
|
|
| @@ -3242,7 +3295,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);
|
| @@ -3260,7 +3312,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);
|
| }
|
| @@ -3276,10 +3328,10 @@ 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)
|
| @@ -3294,7 +3346,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);
|
| }
|
| @@ -3310,8 +3362,9 @@ 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);
|
| }
|
|
|
| @@ -3339,10 +3392,10 @@ 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)
|
| @@ -3357,7 +3410,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);
|
| }
|
| @@ -3375,11 +3428,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)
|
| @@ -3402,7 +3453,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);
|
| @@ -3421,7 +3472,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.
|
| }
|
|
|
| @@ -3451,7 +3501,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;
|
| @@ -3485,7 +3534,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;
|
| @@ -3517,8 +3565,9 @@ 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);
|
| }
|
| @@ -3548,8 +3597,9 @@ 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);
|
| }
|
| @@ -3579,8 +3629,9 @@ 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);
|
| }
|
| @@ -3610,8 +3661,9 @@ 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);
|
| }
|
| @@ -3640,8 +3692,9 @@ static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCa
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::idAttr, cppValue);
|
| }
|
| @@ -3670,8 +3723,9 @@ static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Function
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::nameAttr, cppValue);
|
| }
|
| @@ -3700,8 +3754,9 @@ static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::classAttr, cppValue);
|
| }
|
| @@ -3730,8 +3785,9 @@ static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::F
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::idAttr, cppValue);
|
| }
|
| @@ -3760,8 +3816,9 @@ static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::nameAttr, cppValue);
|
| }
|
| @@ -3790,8 +3847,9 @@ static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::classAttr, cppValue);
|
| }
|
| @@ -3828,8 +3886,9 @@ static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
|
| }
|
| @@ -3870,8 +3929,9 @@ static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
|
| }
|
| @@ -3910,8 +3970,9 @@ static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::otherAttr, cppValue);
|
| }
|
| @@ -3950,8 +4011,9 @@ static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValue);
|
| }
|
| @@ -3992,8 +4054,9 @@ static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
|
| }
|
| @@ -4101,8 +4164,9 @@ static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
|
| if (!impl)
|
| return;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setHref(cppValue);
|
| }
|
|
|
| @@ -4130,8 +4194,9 @@ 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);
|
| }
|
|
|
| @@ -4158,8 +4223,9 @@ static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeS
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setSetterCallWithCurrentWindowAndEnteredWindowStringAttribute(currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
|
| }
|
|
|
| @@ -4186,8 +4252,9 @@ static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cppValue);
|
| }
|
| @@ -4215,8 +4282,9 @@ static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<TreatNullAsEmptyString> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setTreatNullAsEmptyStringStringAttribute(cppValue);
|
| }
|
|
|
| @@ -4243,8 +4311,9 @@ static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<TreatNullAsNullString> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setTreatNullAsNullStringStringAttribute(cppValue);
|
| }
|
|
|
| @@ -4272,8 +4341,9 @@ 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);
|
| }
|
|
|
| @@ -4352,8 +4422,9 @@ static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue);
|
| }
|
| @@ -4382,8 +4453,9 @@ static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue);
|
| }
|
| @@ -4413,8 +4485,9 @@ 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);
|
| }
|
|
|
| @@ -4443,8 +4516,9 @@ 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);
|
| }
|
|
|
| @@ -4525,8 +4599,9 @@ 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);
|
| }
|
|
|
| @@ -4554,8 +4629,9 @@ 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);
|
| }
|
|
|
| @@ -4583,8 +4659,9 @@ 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);
|
| }
|
|
|
| @@ -4614,7 +4691,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);
|
| @@ -4646,7 +4722,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);
|
| @@ -4678,7 +4753,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);
|
| @@ -4726,8 +4800,9 @@ 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);
|
| }
|
|
|
| @@ -4757,8 +4832,9 @@ static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| V8TestObject::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue);
|
| }
|
|
|
| @@ -4791,7 +4867,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);
|
| @@ -4820,8 +4895,9 @@ static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Loc
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue);
|
| }
|
|
|
| @@ -4852,8 +4928,9 @@ static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
|
| ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivateScript", "TestObject", holder, info.GetIsolate());
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return;
|
| + }
|
| const char* validValues[] = {
|
| "",
|
| "EnumValue1",
|
| @@ -5121,8 +5198,9 @@ static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodStringArg(stringArg);
|
| }
|
| @@ -5137,15 +5215,15 @@ 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);
|
| }
|
| @@ -5160,15 +5238,15 @@ 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);
|
| }
|
| @@ -5183,15 +5261,15 @@ 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);
|
| }
|
| @@ -5206,15 +5284,15 @@ 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);
|
| }
|
| @@ -5229,15 +5307,15 @@ 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);
|
| }
|
| @@ -5252,15 +5330,15 @@ 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);
|
| }
|
| @@ -5275,15 +5353,15 @@ 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);
|
| }
|
| @@ -5298,15 +5376,15 @@ 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);
|
| }
|
| @@ -5321,15 +5399,15 @@ 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);
|
| }
|
| @@ -5344,15 +5422,15 @@ 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);
|
| }
|
| @@ -5367,15 +5445,15 @@ 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);
|
| }
|
| @@ -5390,15 +5468,15 @@ 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);
|
| }
|
| @@ -5413,15 +5491,15 @@ 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);
|
| }
|
| @@ -5436,15 +5514,15 @@ 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);
|
| }
|
| @@ -5493,7 +5571,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());
|
| @@ -5501,12 +5578,12 @@ 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;
|
| }
|
| }
|
| @@ -6083,15 +6160,15 @@ 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);
|
| }
|
| @@ -6106,15 +6183,15 @@ 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);
|
| }
|
| @@ -6129,15 +6206,15 @@ 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);
|
| }
|
| @@ -6152,7 +6229,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());
|
| @@ -6160,8 +6236,9 @@ 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;
|
| + }
|
| }
|
| }
|
| impl->voidMethodNullableArrayLongArg(arrayLongArg);
|
| @@ -6210,15 +6287,15 @@ 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);
|
| }
|
| @@ -6233,15 +6310,15 @@ 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);
|
| }
|
| @@ -6256,15 +6333,15 @@ 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);
|
| }
|
| @@ -6279,15 +6356,15 @@ 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);
|
| }
|
| @@ -6302,7 +6379,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());
|
| @@ -6310,8 +6386,9 @@ 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;
|
| + }
|
| }
|
| }
|
| impl->voidMethodNullableSequenceLongArg(longSequenceArg);
|
| @@ -6338,15 +6415,15 @@ 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);
|
| }
|
| @@ -6361,15 +6438,15 @@ 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);
|
| }
|
| @@ -6475,15 +6552,15 @@ 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);
|
| }
|
| @@ -6498,15 +6575,15 @@ 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);
|
| }
|
| @@ -6521,15 +6598,15 @@ 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);
|
| }
|
| @@ -6544,15 +6621,15 @@ 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);
|
| }
|
| @@ -6567,15 +6644,15 @@ 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);
|
| }
|
| @@ -6592,8 +6669,9 @@ 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);
|
| }
|
| @@ -6711,15 +6789,15 @@ 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());
|
| V8StringResource<> testEnumTypeArg;
|
| {
|
| testEnumTypeArg = info[0];
|
| - if (!testEnumTypeArg.prepare())
|
| + if (!testEnumTypeArg.prepare()) {
|
| return;
|
| + }
|
| const char* validValues[] = {
|
| "",
|
| "EnumValue1",
|
| @@ -6727,7 +6805,6 @@ static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
|
| "EnumValue3",
|
| };
|
| if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -6786,8 +6863,9 @@ 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);
|
| }
|
| @@ -6812,6 +6890,7 @@ static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value>
|
| {
|
| if (UNLIKELY(info.Length() < 3)) {
|
| setMinimumArityTypeError(exceptionState, 3, info.Length());
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| @@ -6821,21 +6900,26 @@ static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value>
|
| Vector<String> variadic;
|
| {
|
| arg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
|
| exceptionState.throwTypeError("parameter 2 ('arg2') is not an object.");
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| arg3 = info[2];
|
| - if (!arg3.prepare(exceptionState))
|
| + if (!arg3.prepare(exceptionState)) {
|
| return;
|
| + }
|
| variadic = toImplArguments<Vector<String>>(info, 3, exceptionState);
|
| - if (exceptionState.hadException())
|
| - return;
|
| + if (exceptionState.hadException()) {
|
| + exceptionState.clearException(); return;
|
| + }
|
| }
|
| v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Value());
|
| }
|
| @@ -6857,6 +6941,7 @@ static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa
|
| {
|
| if (UNLIKELY(info.Length() < 1)) {
|
| setMinimumArityTypeError(exceptionState, 1, info.Length());
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| @@ -6864,11 +6949,13 @@ static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa
|
| {
|
| if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
|
| exceptionState.throwTypeError("parameter 1 ('arg1') is not an object.");
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Value());
|
| }
|
| @@ -6913,7 +7000,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());
|
| @@ -6921,12 +7007,12 @@ 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);
|
| }
|
| @@ -6983,15 +7069,15 @@ 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);
|
| }
|
| @@ -7029,15 +7115,15 @@ 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);
|
| }
|
| @@ -7052,7 +7138,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());
|
| @@ -7060,11 +7145,13 @@ static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
|
| int longArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodStringArgLongArg(stringArg, longArg);
|
| }
|
| @@ -7090,8 +7177,9 @@ static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
|
| return;
|
| }
|
| optionalStringArg = info[0];
|
| - if (!optionalStringArg.prepare())
|
| + if (!optionalStringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodOptionalStringArg(optionalStringArg);
|
| }
|
| @@ -7147,8 +7235,9 @@ 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);
|
| }
|
| @@ -7175,8 +7264,9 @@ 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());
|
| }
|
| @@ -7203,8 +7293,9 @@ 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));
|
| }
|
| @@ -7231,8 +7322,9 @@ 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));
|
| }
|
| @@ -7247,7 +7339,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());
|
| @@ -7261,15 +7352,17 @@ 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);
|
| }
|
| @@ -7284,7 +7377,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());
|
| @@ -7299,22 +7391,25 @@ 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);
|
| }
|
| @@ -7329,7 +7424,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());
|
| @@ -7343,8 +7437,9 @@ 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);
|
| return;
|
| @@ -7352,7 +7447,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;
|
| }
|
| }
|
| @@ -7369,7 +7463,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());
|
| @@ -7385,7 +7478,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)) {
|
| @@ -7393,8 +7485,9 @@ 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);
|
| }
|
| @@ -7412,12 +7505,12 @@ 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);
|
| }
|
| @@ -7435,8 +7528,9 @@ 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");
|
| }
|
| @@ -7456,8 +7550,9 @@ static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8::
|
| {
|
| if (!info[0]->IsUndefined()) {
|
| defaultStringArg = info[0];
|
| - if (!defaultStringArg.prepare())
|
| + if (!defaultStringArg.prepare()) {
|
| return;
|
| + }
|
| } else {
|
| defaultStringArg = String("foo");
|
| }
|
| @@ -7480,22 +7575,25 @@ 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;
|
| }
|
| @@ -7516,8 +7614,9 @@ 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;
|
| }
|
| @@ -7538,8 +7637,9 @@ 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;
|
| }
|
| @@ -7560,8 +7660,9 @@ 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;
|
| }
|
| @@ -7582,8 +7683,9 @@ 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;
|
| }
|
| @@ -7603,8 +7705,9 @@ static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI
|
| {
|
| if (!info[0]->IsUndefined()) {
|
| defaultStringArg = info[0];
|
| - if (!defaultStringArg.prepare())
|
| + if (!defaultStringArg.prepare()) {
|
| return;
|
| + }
|
| } else {
|
| defaultStringArg = nullptr;
|
| }
|
| @@ -7650,22 +7753,25 @@ 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 */;
|
| }
|
| @@ -7686,8 +7792,9 @@ 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 */;
|
| }
|
| @@ -7707,8 +7814,9 @@ 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);
|
| }
|
| @@ -7723,7 +7831,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());
|
| @@ -7731,11 +7838,13 @@ static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
|
| Vector<String> variadicStringArgs;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs);
|
| }
|
| @@ -7754,7 +7863,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])));
|
| @@ -7773,7 +7881,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());
|
| @@ -7783,13 +7890,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])));
|
| @@ -7812,7 +7917,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])));
|
| @@ -7833,8 +7937,9 @@ 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);
|
| }
|
| @@ -7847,11 +7952,13 @@ 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);
|
| }
|
| @@ -7877,11 +7984,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;
|
| }
|
|
|
| @@ -7897,8 +8002,9 @@ 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);
|
| }
|
| @@ -7917,15 +8023,17 @@ static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
|
| --numArgsPassed;
|
| }
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| if (UNLIKELY(numArgsPassed <= 1)) {
|
| impl->overloadedMethodB(stringArg);
|
| return;
|
| }
|
| longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| impl->overloadedMethodB(stringArg, longArg);
|
| }
|
| @@ -7959,11 +8067,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;
|
| }
|
|
|
| @@ -7979,8 +8085,9 @@ 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);
|
| }
|
| @@ -8018,11 +8125,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;
|
| }
|
|
|
| @@ -8038,8 +8143,9 @@ 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);
|
| }
|
| @@ -8051,8 +8157,9 @@ 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);
|
| }
|
| @@ -8076,11 +8183,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;
|
| }
|
|
|
| @@ -8096,8 +8201,9 @@ 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);
|
| }
|
| @@ -8139,11 +8245,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;
|
| }
|
|
|
| @@ -8168,8 +8272,9 @@ static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
|
| return;
|
| }
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->overloadedMethodF(stringArg);
|
| }
|
| @@ -8181,8 +8286,9 @@ 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);
|
| }
|
| @@ -8219,7 +8325,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;
|
| }
|
|
|
| @@ -8235,8 +8340,9 @@ 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);
|
| }
|
| @@ -8291,7 +8397,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;
|
| }
|
|
|
| @@ -8347,11 +8452,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;
|
| }
|
|
|
| @@ -8366,8 +8469,9 @@ static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->overloadedMethodI(stringArg);
|
| }
|
| @@ -8379,8 +8483,9 @@ 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);
|
| }
|
| @@ -8408,11 +8513,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;
|
| }
|
|
|
| @@ -8427,8 +8530,9 @@ static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>&
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->overloadedMethodJ(stringArg);
|
| }
|
| @@ -8441,12 +8545,12 @@ 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);
|
| }
|
| @@ -8470,11 +8574,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;
|
| }
|
|
|
| @@ -8503,8 +8605,9 @@ static void overloadedMethodK2Method(const v8::FunctionCallbackInfo<v8::Value>&
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->overloadedMethodK(stringArg);
|
| }
|
| @@ -8528,11 +8631,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;
|
| }
|
|
|
| @@ -8549,11 +8650,13 @@ 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);
|
| }
|
| @@ -8566,11 +8669,13 @@ static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>&
|
| Vector<ScriptValue> restArgs;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| impl->overloadedMethodL(stringArg, restArgs);
|
| }
|
| @@ -8612,11 +8717,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;
|
| }
|
|
|
| @@ -8640,11 +8743,13 @@ static void promiseOverloadMethod2MethodPromise(const v8::FunctionCallbackInfo<v
|
| arg1 = toDOMWindow(info.GetIsolate(), info[0]);
|
| if (!arg1) {
|
| exceptionState.throwTypeError("parameter 1 is not of type 'Window'.");
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value());
|
| }
|
| @@ -8666,11 +8771,13 @@ 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'.");
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value());
|
| }
|
| @@ -8707,12 +8814,14 @@ static void promiseOverloadMethodMethod(const v8::FunctionCallbackInfo<v8::Value
|
| if (info.Length() >= 0) {
|
| setArityTypeError(exceptionState, "[0, 2]", info.Length());
|
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value());
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value());
|
| + exceptionState.clearException();
|
| return;
|
| }
|
|
|
| @@ -8740,8 +8849,9 @@ 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);
|
| }
|
| @@ -8766,7 +8876,6 @@ static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -8782,8 +8891,9 @@ 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);
|
| }
|
| @@ -8808,7 +8918,6 @@ static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -8823,8 +8932,9 @@ 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);
|
| }
|
| @@ -8836,11 +8946,13 @@ 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);
|
| }
|
| @@ -8866,11 +8978,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;
|
| }
|
|
|
| @@ -8884,15 +8994,15 @@ 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::current(info.GetIsolate());
|
| ScriptValue result = impl->item(scriptState, index);
|
| @@ -8909,7 +9019,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());
|
| @@ -8917,11 +9026,13 @@ 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())
|
| + if (!value.prepare()) {
|
| return;
|
| + }
|
| }
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| String result = impl->setItem(scriptState, index, value);
|
| @@ -8938,15 +9049,15 @@ 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);
|
| }
|
| @@ -8961,15 +9072,15 @@ 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);
|
| }
|
| @@ -9005,8 +9116,9 @@ 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);
|
| }
|
| @@ -9022,8 +9134,9 @@ static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback
|
| V8StringResource<> defaultUndefinedStringArg;
|
| {
|
| defaultUndefinedStringArg = info[0];
|
| - if (!defaultUndefinedStringArg.prepare())
|
| + if (!defaultUndefinedStringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
|
| }
|
| @@ -9038,15 +9151,15 @@ 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);
|
| }
|
| @@ -9066,8 +9179,9 @@ static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa
|
| V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg;
|
| {
|
| treatNullAsEmptyStringStringArg = info[0];
|
| - if (!treatNullAsEmptyStringStringArg.prepare())
|
| + if (!treatNullAsEmptyStringStringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringStringArg);
|
| }
|
| @@ -9087,8 +9201,9 @@ static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal
|
| V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg;
|
| {
|
| treatNullAsNullStringStringArg = info[0];
|
| - if (!treatNullAsNullStringStringArg.prepare())
|
| + if (!treatNullAsNullStringStringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringArg);
|
| }
|
| @@ -9108,8 +9223,9 @@ static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
|
| V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStringArg;
|
| {
|
| treatNullAsNullStringStringArg = info[0];
|
| - if (!treatNullAsNullStringStringArg.prepare())
|
| + if (!treatNullAsNullStringStringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(treatNullAsNullStringStringArg);
|
| }
|
| @@ -9219,8 +9335,9 @@ static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
|
| return;
|
| }
|
| optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 1));
|
| @@ -9271,7 +9388,6 @@ static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl->checkSecurityForNodeVoidMethod(), exceptionState)) {
|
| v8SetReturnValueNull(info);
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| impl->checkSecurityForNodeVoidMethod();
|
| @@ -9383,8 +9499,9 @@ 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);
|
| }
|
| @@ -9411,7 +9528,6 @@ static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Val
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9433,8 +9549,9 @@ 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);
|
| }
|
| @@ -9461,7 +9578,6 @@ static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9483,8 +9599,9 @@ 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);
|
| }
|
| @@ -9510,7 +9627,6 @@ static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9532,8 +9648,9 @@ 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);
|
| }
|
| @@ -9560,7 +9677,6 @@ static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9582,8 +9698,9 @@ 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);
|
| }
|
| @@ -9610,7 +9727,6 @@ static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9632,8 +9748,9 @@ 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);
|
| }
|
| @@ -9662,7 +9779,6 @@ static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9684,8 +9800,9 @@ 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);
|
| }
|
| @@ -9713,7 +9830,6 @@ static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9735,8 +9851,9 @@ static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
|
| int arg;
|
| {
|
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg);
|
| }
|
| @@ -9764,7 +9881,6 @@ static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v
|
| break;
|
| }
|
| exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
|
|
| @@ -9823,8 +9939,9 @@ static void originTrialEnabledOverloadedVoidMethod1Method(const v8::FunctionCall
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->originTrialEnabledOverloadedVoidMethod(stringArg);
|
| }
|
| @@ -9836,8 +9953,9 @@ static void originTrialEnabledOverloadedVoidMethod2Method(const v8::FunctionCall
|
| int longArg;
|
| {
|
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| }
|
| impl->originTrialEnabledOverloadedVoidMethod(longArg);
|
| }
|
| @@ -9865,11 +9983,9 @@ static void originTrialEnabledOverloadedVoidMethodMethod(const v8::FunctionCallb
|
| }
|
| 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;
|
| }
|
|
|
| @@ -9884,8 +10000,9 @@ static void partiallyOriginTrialEnabledOverloadedVoidMethod1Method(const v8::Fun
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->partiallyOriginTrialEnabledOverloadedVoidMethod(stringArg);
|
| }
|
| @@ -9912,11 +10029,13 @@ static void partiallyOriginTrialEnabledOverloadedVoidMethod3Method(const v8::Fun
|
| V8StringResource<> stringArg;
|
| {
|
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| stringArg = info[1];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->partiallyOriginTrialEnabledOverloadedVoidMethod(longArg, stringArg);
|
| }
|
| @@ -9930,15 +10049,16 @@ static void partiallyOriginTrialEnabledOverloadedVoidMethod4Method(const v8::Fun
|
| TestInterfaceImplementation* testInterfaceArg;
|
| {
|
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| - if (exceptionState.throwIfNeeded())
|
| + if (exceptionState.hadException()) {
|
| return;
|
| + }
|
| stringArg = info[1];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[2]);
|
| if (!testInterfaceArg) {
|
| exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface'.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -9976,11 +10096,9 @@ static void partiallyOriginTrialEnabledOverloadedVoidMethodMethod(const v8::Func
|
| }
|
| 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;
|
| }
|
|
|
| @@ -10062,24 +10180,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)
|
| @@ -10158,7 +10273,6 @@ static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| impl->raisesExceptionVoidMethod(exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -10174,7 +10288,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());
|
| @@ -10200,18 +10313,17 @@ 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;
|
| }
|
| }
|
| @@ -10226,7 +10338,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());
|
| @@ -10234,14 +10345,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;
|
| }
|
| }
|
| @@ -10260,7 +10369,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()));
|
| @@ -10270,7 +10378,6 @@ static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
|
| }
|
| impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -10286,7 +10393,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);
|
| @@ -10303,7 +10409,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);
|
| @@ -10319,20 +10424,19 @@ 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;
|
| }
|
| }
|
| @@ -10381,8 +10485,9 @@ static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->runtimeEnabledOverloadedVoidMethod(stringArg);
|
| }
|
| @@ -10394,8 +10499,9 @@ 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);
|
| }
|
| @@ -10423,11 +10529,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;
|
| }
|
|
|
| @@ -10442,8 +10546,9 @@ static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio
|
| V8StringResource<> stringArg;
|
| {
|
| stringArg = info[0];
|
| - if (!stringArg.prepare())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg);
|
| }
|
| @@ -10470,11 +10575,13 @@ 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())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| }
|
| impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg);
|
| }
|
| @@ -10488,15 +10595,16 @@ 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())
|
| + if (!stringArg.prepare()) {
|
| return;
|
| + }
|
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[2]);
|
| if (!testInterfaceArg) {
|
| exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface'.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -10559,11 +10667,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;
|
| }
|
|
|
| @@ -10600,7 +10706,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])));
|
| @@ -10727,15 +10832,15 @@ 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);
|
| }
|
| @@ -10750,15 +10855,15 @@ 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);
|
| }
|
| @@ -10824,15 +10929,15 @@ 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;
|
| if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result))
|
| @@ -10855,8 +10960,9 @@ static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
|
| V8StringResource<> value;
|
| {
|
| value = info[0];
|
| - if (!value.prepare())
|
| + if (!value.prepare()) {
|
| return;
|
| + }
|
| }
|
| String result;
|
| if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result))
|
| @@ -10900,7 +11006,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());
|
| @@ -10913,24 +11018,25 @@ 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())
|
| + if (!string.prepare()) {
|
| return;
|
| + }
|
| }
|
| Node* result = nullptr;
|
| if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, document, node, value1, value2, string, &result))
|
| @@ -10948,7 +11054,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());
|
| @@ -10956,11 +11061,13 @@ 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));
|
| }
|
| @@ -10977,7 +11084,6 @@ static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| Iterator* result = impl->keysForBinding(scriptState, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValue(info, result);
|
| @@ -10995,7 +11101,6 @@ static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValue(info, result);
|
| @@ -11013,7 +11118,6 @@ static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValue(info, result);
|
| @@ -11029,7 +11133,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());
|
| @@ -11038,7 +11141,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]);
|
| @@ -11047,7 +11149,6 @@ static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()), callback, thisArg, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -11062,20 +11163,19 @@ 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::current(info.GetIsolate());
|
| bool result = impl->hasForBinding(scriptState, key, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValueBool(info, result);
|
| @@ -11091,20 +11191,19 @@ 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::current(info.GetIsolate());
|
| ScriptValue result = impl->getForBinding(scriptState, key, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValue(info, result.v8Value());
|
| @@ -11122,7 +11221,6 @@ static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| impl->clearForBinding(scriptState, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| }
|
| @@ -11137,20 +11235,19 @@ 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::current(info.GetIsolate());
|
| bool result = impl->deleteForBinding(scriptState, key, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValueBool(info, result);
|
| @@ -11166,7 +11263,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());
|
| @@ -11174,16 +11270,17 @@ 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::current(info.GetIsolate());
|
| TestObject* result = impl->setForBinding(scriptState, key, value, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValue(info, result);
|
| @@ -11223,7 +11320,6 @@ static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| Iterator* result = impl->iterator(scriptState, exceptionState);
|
| if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| v8SetReturnValue(info, result);
|
| @@ -11253,8 +11349,9 @@ static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
|
| {
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| V8StringResource<> propertyValue = v8Value;
|
| - if (!propertyValue.prepare())
|
| + if (!propertyValue.prepare()) {
|
| return;
|
| + }
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| bool result = impl->setItem(scriptState, index, propertyValue);
|
| if (!result)
|
| @@ -11273,7 +11370,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);
|
| @@ -11311,8 +11408,9 @@ static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
|
| if (!propertyName.prepare())
|
| return;
|
| V8StringResource<> propertyValue = v8Value;
|
| - if (!propertyValue.prepare())
|
| + if (!propertyValue.prepare()) {
|
| return;
|
| + }
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| bool result = impl->anonymousNamedSetter(scriptState, propertyName, propertyValue);
|
| if (!result)
|
| @@ -11335,7 +11433,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;
|
| @@ -11372,7 +11470,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) {
|
| @@ -12044,8 +12142,9 @@ 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());
|
| return true;
|
| @@ -12076,8 +12175,9 @@ 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());
|
| return true;
|
| @@ -12108,8 +12208,9 @@ bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri
|
| if (v8Value.IsEmpty())
|
| return false;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return false;
|
| + }
|
| *result = cppValue;
|
| RELEASE_ASSERT(!exceptionState.hadException());
|
| return true;
|
| @@ -12205,8 +12306,9 @@ 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());
|
| return true;
|
| @@ -12236,8 +12338,9 @@ 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;
|
| return true;
|
| @@ -12267,8 +12370,9 @@ 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;
|
| return true;
|
| @@ -12320,8 +12424,9 @@ bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* fra
|
| if (v8Value.IsEmpty())
|
| return false;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return false;
|
| + }
|
| RELEASE_ASSERT(!exceptionState.hadException());
|
| *result = cppValue;
|
| return true;
|
| @@ -12424,8 +12529,9 @@ bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(L
|
| if (v8Value.IsEmpty())
|
| return false;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return false;
|
| + }
|
| RELEASE_ASSERT(!exceptionState.hadException());
|
| *result = cppValue;
|
| return true;
|
| @@ -12477,8 +12583,9 @@ bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(LocalFrame
|
| if (v8Value.IsEmpty())
|
| return false;
|
| V8StringResource<> cppValue = v8Value;
|
| - if (!cppValue.prepare())
|
| + if (!cppValue.prepare()) {
|
| return false;
|
| + }
|
| RELEASE_ASSERT(!exceptionState.hadException());
|
| *result = cppValue;
|
| return true;
|
|
|