Index: Source/bindings/tests/results/V8TestObject.cpp |
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp |
index 368d275ddbed9db5bf3ddfd3540db3a5f7bc2e03..ee31b5f83f9dab38b69be4a04f00186f5efe2214 100644 |
--- a/Source/bindings/tests/results/V8TestObject.cpp |
+++ b/Source/bindings/tests/results/V8TestObject.cpp |
@@ -243,8 +243,9 @@ static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro |
static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "TestObject", info.Holder(), info.GetIsolate()); |
jsbell
2014/01/02 18:03:23
Is there going to be any perf impact from this ext
sof
2014/01/02 19:30:31
The setter here being passed a simple number not b
|
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt8(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), exceptionState); |
imp->setByteAttr(cppValue); |
} |
@@ -270,8 +271,9 @@ static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr |
static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(unsigned, cppValue, toUInt8(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionState), exceptionState); |
imp->setOctetAttr(cppValue); |
} |
@@ -297,8 +299,9 @@ static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr |
static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt16(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), exceptionState); |
imp->setShortAttr(cppValue); |
} |
@@ -324,8 +327,9 @@ static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons |
static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(unsigned, cppValue, toUInt16(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionState), exceptionState); |
imp->setUnsignedShortAttr(cppValue); |
} |
@@ -351,8 +355,9 @@ static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro |
static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setLongAttr(cppValue); |
} |
@@ -378,8 +383,9 @@ static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8: |
static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(long long, cppValue, toInt64(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionState), exceptionState); |
imp->setLongLongAttr(cppValue); |
} |
@@ -405,8 +411,9 @@ static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c |
static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(unsigned long long, cppValue, toUInt64(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, exceptionState), exceptionState); |
imp->setUnsignedLongLongAttr(cppValue); |
} |
@@ -627,8 +634,9 @@ static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>, |
static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); |
} |
@@ -656,8 +664,9 @@ static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S |
static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsignedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionState), exceptionState); |
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAttr, cppValue); |
} |
@@ -772,8 +781,9 @@ static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str |
static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCustomIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue); |
} |
@@ -919,8 +929,9 @@ static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> |
static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetterException", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setAttrWithGetterException(cppValue); |
} |
@@ -948,7 +959,7 @@ static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, |
{ |
ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetterException", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setAttrWithSetterException(cppValue, exceptionState); |
exceptionState.throwIfNeeded(); |
} |
@@ -1053,8 +1064,9 @@ static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String |
static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "withScriptStateAttribute", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
ScriptState* currentState = ScriptState::current(); |
if (!currentState) |
return; |
@@ -1345,8 +1357,9 @@ static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, |
static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeByteAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt8(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeByteAttr(cppValue); |
} |
@@ -1372,8 +1385,9 @@ static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, |
static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeOctetAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeOctetAttr(cppValue); |
} |
@@ -1399,8 +1413,9 @@ static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, |
static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeShortAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt16(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeShortAttr(cppValue); |
} |
@@ -1426,8 +1441,9 @@ static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: |
static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeUnsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeUnsignedShortAttr(cppValue); |
} |
@@ -1453,8 +1469,9 @@ static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, |
static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt32(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeLongAttr(cppValue); |
} |
@@ -1480,8 +1497,9 @@ static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S |
static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeUnsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeUnsignedLongAttr(cppValue); |
} |
@@ -1507,8 +1525,9 @@ static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin |
static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeLongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(long long, cppValue, toInt64(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeLongLongAttr(cppValue); |
} |
@@ -1534,8 +1553,9 @@ static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v |
static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeUnsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, cppValue, toUInt64(jsValue, EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, EnforceRange, exceptionState), exceptionState); |
imp->setEnforcedRangeUnsignedLongLongAttr(cppValue); |
} |
@@ -1566,8 +1586,9 @@ static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const |
#if ENABLE(Condition1) |
static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAttr1", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setConditionalAttr1(cppValue); |
} |
#endif // ENABLE(Condition1) |
@@ -1601,8 +1622,9 @@ static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const |
#if ENABLE(Condition1) && ENABLE(Condition2) |
static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAttr2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setConditionalAttr2(cppValue); |
} |
#endif // ENABLE(Condition1) && ENABLE(Condition2) |
@@ -1636,8 +1658,9 @@ static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const |
#if ENABLE(Condition1) || ENABLE(Condition2) |
static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAttr3", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setConditionalAttr3(cppValue); |
} |
#endif // ENABLE(Condition1) || ENABLE(Condition2) |
@@ -1795,8 +1818,9 @@ static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c |
static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRuntimeAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setEnabledAtRuntimeAttr(cppValue); |
} |
@@ -1822,8 +1846,9 @@ static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, |
static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerContextAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setEnabledPerContextAttr(cppValue); |
} |
@@ -2015,8 +2040,9 @@ static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P |
static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setBlueberry(cppValue); |
} |
@@ -2164,8 +2190,9 @@ static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S |
static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSettableAttribute", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setNullableLongSettableAttribute(cppValue); |
} |
@@ -2200,8 +2227,9 @@ static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co |
static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "nullableStringValue", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setNullableStringValue(cppValue); |
} |
@@ -2324,8 +2352,9 @@ static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co |
static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttr1", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttr1(cppValue); |
} |
@@ -2359,8 +2388,9 @@ static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co |
static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttr2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttr2(cppValue); |
} |
@@ -2394,8 +2424,9 @@ static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8: |
static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttr2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttr2(cppValue); |
} |
@@ -2429,8 +2460,9 @@ static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local< |
static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedInIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
} |
@@ -2461,8 +2493,9 @@ static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl |
static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedInIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
} |
@@ -2488,8 +2521,9 @@ static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin |
static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrSetter1", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttrSetter1(cppValue); |
} |
@@ -2520,8 +2554,9 @@ static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin |
static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttrSetter2(cppValue); |
} |
@@ -2552,8 +2587,9 @@ static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc |
static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttrSetter2(cppValue); |
} |
@@ -2584,8 +2620,9 @@ static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: |
static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedInIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
} |
@@ -2616,8 +2653,9 @@ static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa |
static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedInIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
} |
@@ -2646,8 +2684,9 @@ static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin |
static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrGetter1", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttrGetter1(cppValue); |
} |
@@ -2676,8 +2715,9 @@ static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin |
static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttrGetter2(cppValue); |
} |
@@ -2706,8 +2746,9 @@ static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc |
static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedAttrGetter2(cppValue); |
} |
@@ -2736,8 +2777,9 @@ static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8:: |
static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedInIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
} |
@@ -2763,8 +2805,9 @@ static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa |
static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedInIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
} |
@@ -2803,7 +2846,8 @@ static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c |
static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStaticAttr", "TestObject", info.Holder(), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
TestObj::setDeprecatedStaticAttr(cppValue); |
} |
@@ -2845,8 +2889,9 @@ static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v |
static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); |
+ V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState); |
imp->setDeprecatedAttr(cppValue); |
} |
@@ -2953,15 +2998,18 @@ static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& |
static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodWithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 3)) { |
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
if (info.Length() <= 2 || !info[2]->IsFunction()) { |
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.GetIsolate()); |
+ exceptionState.throwTypeError("The callback provided as parameter 3 is not a function."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext()); |
@@ -2990,15 +3038,18 @@ static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& |
static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodWithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 3)) { |
- throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
if (info.Length() <= 2 || !info[2]->IsFunction()) { |
- throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.GetIsolate()); |
+ exceptionState.throwTypeError("The callback provided as parameter 3 is not a function."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext()); |
@@ -3028,15 +3079,18 @@ static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i |
static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 3)) { |
- throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
if (info.Length() <= 2 || !info[2]->IsFunction()) { |
- throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.GetIsolate()); |
+ exceptionState.throwTypeError("The callback provided as parameter 3 is not a function."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext()); |
@@ -3070,12 +3124,14 @@ static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v |
static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodReturningSequence", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodReturningSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.GetIsolate())); |
} |
@@ -3516,12 +3572,13 @@ static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb |
static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithOptionalArg", "TestObject", info.Holder(), info.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
if (UNLIKELY(info.Length() <= 0)) { |
imp->methodWithOptionalArg(); |
return; |
} |
- V8TRYCATCH_VOID(int, opt, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[0], exceptionState), exceptionState); |
imp->methodWithOptionalArg(opt); |
} |
@@ -3534,17 +3591,19 @@ static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v |
static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithNonOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptionalArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exceptionState); |
if (UNLIKELY(info.Length() <= 1)) { |
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); |
return; |
} |
- V8TRYCATCH_VOID(int, opt, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[1], exceptionState), exceptionState); |
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); |
} |
@@ -3557,22 +3616,24 @@ static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct |
static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithNonOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptionalArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exceptionState); |
if (UNLIKELY(info.Length() <= 1)) { |
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); |
return; |
} |
- V8TRYCATCH_VOID(int, opt1, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, opt1, toInt32(info[1], exceptionState), exceptionState); |
if (UNLIKELY(info.Length() <= 2)) { |
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); |
return; |
} |
- V8TRYCATCH_VOID(int, opt2, toInt32(info[2])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, opt2, toInt32(info[2], exceptionState), exceptionState); |
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); |
} |
@@ -3653,14 +3714,17 @@ static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb |
static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithNonCallbackArgAndCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallbackArgAndCallbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, nonCallback, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, nonCallback, toInt32(info[0], exceptionState), exceptionState); |
if (info.Length() <= 1 || !info[1]->IsFunction()) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallbackArgAndCallbackInterfaceArg", "TestObject", "The callback provided as parameter 2 is not a function."), info.GetIsolate()); |
+ exceptionState.throwTypeError("The callback provided as parameter 2 is not a function."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[1]), getExecutionContext()); |
@@ -3760,12 +3824,14 @@ static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback |
static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, value, toInt8(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeInt8(value); |
} |
@@ -3778,12 +3844,14 @@ static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI |
static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt8(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeUInt8(value); |
} |
@@ -3796,12 +3864,14 @@ static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback |
static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt16(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, value, toInt16(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeInt16(value); |
} |
@@ -3814,12 +3884,14 @@ static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback |
static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeUInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt16(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt16(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeUInt16(value); |
} |
@@ -3832,12 +3904,14 @@ static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac |
static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(int, value, toInt32(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeInt32(value); |
} |
@@ -3850,12 +3924,14 @@ static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback |
static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt32(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeUInt32(value); |
} |
@@ -3868,12 +3944,14 @@ static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac |
static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(long long, value, toInt64(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeInt64(value); |
} |
@@ -3886,12 +3964,14 @@ static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback |
static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithEnforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRangeUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(info[0], EnforceRange, ok), info.GetIsolate()); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned long long, value, toUInt64(info[0], EnforceRange, exceptionState), exceptionState); |
imp->methodWithEnforceRangeUInt64(value); |
} |
@@ -3986,12 +4066,14 @@ static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf |
static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->overloadedMethod(longArg); |
} |
@@ -4088,13 +4170,16 @@ static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va |
static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate()); |
+ exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
OwnPtr<TestObject> objArg = info[0]->IsNull() ? nullptr : V8TestObject::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext()); |
@@ -4102,7 +4187,7 @@ static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& |
imp->overloadedMethodA(objArg.release()); |
return; |
} |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState); |
imp->overloadedMethodA(objArg.release(), longArg); |
} |
@@ -4212,11 +4297,12 @@ static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& |
static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethodWithOptional", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() <= 0)) { |
v8SetReturnValueInt(info, TestObj::classMethodWithOptional()); |
return; |
} |
- V8TRYCATCH_VOID(int, arg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, arg, toInt32(info[0], exceptionState), exceptionState); |
v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg)); |
} |
@@ -4236,8 +4322,10 @@ static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> |
static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethodWithClamp", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("classMethodWithClamp", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
@@ -4261,12 +4349,14 @@ static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 |
static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRuntimeMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->enabledAtRuntimeMethod(longArg); |
} |
@@ -4279,12 +4369,14 @@ static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< |
static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerContextMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->enabledPerContextMethod(longArg); |
} |
@@ -4445,15 +4537,18 @@ static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< |
static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "svgPointMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); |
- V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState), exceptionState); |
if (!item) { |
- throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); |
+ exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->svgPointMethod(item->propertyReference(), index)))); |
@@ -4481,9 +4576,10 @@ static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> |
return; |
} |
V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); |
- V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState), exceptionState); |
if (!item) { |
- throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod", "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); |
+ exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index, exceptionState); |
@@ -4523,7 +4619,7 @@ static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); |
- V8TRYCATCH_VOID(int, b, toInt32(info[2])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, b, toInt32(info[2], exceptionState), exceptionState); |
bool result = imp->strictFunction(str, a, b, exceptionState); |
if (exceptionState.throwIfNeeded()) |
return; |
@@ -4603,8 +4699,10 @@ static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: |
static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithNullableArguments", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 3)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArguments", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
@@ -4612,9 +4710,10 @@ static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]); |
String str = strStringResource; |
bool lIsNull = info[1]->IsNull(); |
- V8TRYCATCH_VOID(int, l, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, l, toInt32(info[1], exceptionState), exceptionState); |
if (info.Length() <= 2 || !(info[2]->IsFunction() || info[2]->IsNull())) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArguments", "TestObject", "The callback provided as parameter 3 is not a function."), info.GetIsolate()); |
+ exceptionState.throwTypeError("The callback provided as parameter 3 is not a function."); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
OwnPtr<TestObject> obj = info[2]->IsNull() ? nullptr : V8TestObject::create(v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext()); |
@@ -4662,35 +4761,41 @@ static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI |
static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->overloadedPerWorldMethod(longArg); |
} |
static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->overloadedPerWorldMethod(longArg); |
} |
static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState); |
imp->overloadedPerWorldMethod(strArg, longArg); |
} |
@@ -4723,13 +4828,15 @@ static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf |
static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState); |
imp->overloadedPerWorldMethod(strArg, longArg); |
} |
@@ -4762,12 +4869,14 @@ static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio |
static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggedMethod1", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->activityLoggedMethod1(longArg); |
} |
@@ -4785,12 +4894,14 @@ static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v |
static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggedMethod2", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->activityLoggedMethod2(longArg); |
} |
@@ -4808,12 +4919,14 @@ static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v |
static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggedMethod2", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->activityLoggedMethod2(longArg); |
} |
@@ -4831,12 +4944,14 @@ static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa |
static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsolatedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->activityLoggedInIsolatedWorldMethod(longArg); |
} |
@@ -4854,12 +4969,14 @@ static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function |
static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsolatedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->activityLoggedInIsolatedWorldMethod(longArg); |
} |
@@ -4872,35 +4989,41 @@ static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const |
static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedActivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLoggedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->overloadedActivityLoggedMethod(longArg); |
} |
static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedActivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLoggedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
imp->overloadedActivityLoggedMethod(longArg); |
} |
static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedActivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLoggedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState); |
imp->overloadedActivityLoggedMethod(strArg, longArg); |
} |
@@ -4938,13 +5061,15 @@ static void overloadedActivityLoggedMethodMethodCallback(const v8::FunctionCallb |
static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedActivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLoggedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
- V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); |
+ V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState); |
imp->overloadedActivityLoggedMethod(strArg, longArg); |
} |