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

Unified Diff: Source/bindings/tests/results/core/V8TestDictionary.cpp

Issue 938733003: IDL: Fix exception handling when converting V8 value to union/dictionary (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/tests/results/core/V8TestDictionary.cpp
diff --git a/Source/bindings/tests/results/core/V8TestDictionary.cpp b/Source/bindings/tests/results/core/V8TestDictionary.cpp
index 70e599ef997c57c070221fdb26795c9dcac46c96..b5ce134d7c39ed0f7ca654f236977245378c5212 100644
--- a/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -80,7 +80,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} else if (doubleOrNullMemberValue->IsNull()) {
impl.setDoubleOrNullMemberToNull();
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(double, doubleOrNullMember, toDouble(doubleOrNullMemberValue, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(double, doubleOrNullMember, toDouble(doubleOrNullMemberValue, exceptionState), exceptionState);
impl.setDoubleOrNullMember(doubleOrNullMember);
}
@@ -93,7 +93,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
DoubleOrString doubleOrStringMember;
- TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrString::toImpl(isolate, doubleOrStringMemberValue, doubleOrStringMember, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL_NOTHROW(V8DoubleOrString::toImpl(isolate, doubleOrStringMemberValue, doubleOrStringMember, exceptionState), exceptionState);
impl.setDoubleOrStringMember(doubleOrStringMember);
}
@@ -123,7 +123,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TOSTRING_VOID(V8StringResource<>, enumMember, enumMemberValue);
+ TOSTRING_VOID_EXCEPTIONSTATE(V8StringResource<>, enumMember, enumMemberValue, exceptionState);
String string = enumMember;
if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
exceptionState.throwTypeError("member enumMember ('" + string + "') is not a valid enum value.");
@@ -156,7 +156,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (internalDictionarySequenceMemberValue.IsEmpty() || internalDictionarySequenceMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(Vector<InternalDictionary>, internalDictionarySequenceMember, toImplArray<InternalDictionary>(internalDictionarySequenceMemberValue, 0, isolate, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(Vector<InternalDictionary>, internalDictionarySequenceMember, toImplArray<InternalDictionary>(internalDictionarySequenceMemberValue, 0, isolate, exceptionState), exceptionState);
impl.setInternalDictionarySequenceMember(internalDictionarySequenceMember);
}
@@ -168,7 +168,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (longMemberValue.IsEmpty() || longMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(int, longMember, toInt32(longMemberValue, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(int, longMember, toInt32(longMemberValue, exceptionState), exceptionState);
impl.setLongMember(longMember);
}
@@ -215,7 +215,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
DoubleOrString otherDoubleOrStringMember;
- TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrString::toImpl(isolate, otherDoubleOrStringMemberValue, otherDoubleOrStringMember, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL_NOTHROW(V8DoubleOrString::toImpl(isolate, otherDoubleOrStringMemberValue, otherDoubleOrStringMember, exceptionState), exceptionState);
impl.setOtherDoubleOrStringMember(otherDoubleOrStringMember);
}
@@ -227,7 +227,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (restrictedDoubleMemberValue.IsEmpty() || restrictedDoubleMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(double, restrictedDoubleMember, toRestrictedDouble(restrictedDoubleMemberValue, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(double, restrictedDoubleMember, toRestrictedDouble(restrictedDoubleMemberValue, exceptionState), exceptionState);
impl.setRestrictedDoubleMember(restrictedDoubleMember);
}
@@ -239,7 +239,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (stringArrayMemberValue.IsEmpty() || stringArrayMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(Vector<String>, stringArrayMember, toImplArray<String>(stringArrayMemberValue, 0, isolate, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(Vector<String>, stringArrayMember, toImplArray<String>(stringArrayMemberValue, 0, isolate, exceptionState), exceptionState);
impl.setStringArrayMember(stringArrayMember);
}
@@ -251,7 +251,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue);
+ TOSTRING_VOID_EXCEPTIONSTATE(V8StringResource<>, stringMember, stringMemberValue, exceptionState);
impl.setStringMember(stringMember);
}
@@ -265,7 +265,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} else if (stringOrNullMemberValue->IsNull()) {
impl.setStringOrNullMemberToNull();
} else {
- TOSTRING_VOID(V8StringResource<>, stringOrNullMember, stringOrNullMemberValue);
+ TOSTRING_VOID_EXCEPTIONSTATE(V8StringResource<>, stringOrNullMember, stringOrNullMemberValue, exceptionState);
impl.setStringOrNullMember(stringOrNullMember);
}
@@ -277,7 +277,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (stringSequenceMemberValue.IsEmpty() || stringSequenceMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(Vector<String>, stringSequenceMember, toImplArray<String>(stringSequenceMemberValue, 0, isolate, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(Vector<String>, stringSequenceMember, toImplArray<String>(stringSequenceMemberValue, 0, isolate, exceptionState), exceptionState);
impl.setStringSequenceMember(stringSequenceMember);
}
@@ -290,7 +290,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
TestInterface2OrUint8Array testInterface2OrUint8ArrayMember;
- TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8TestInterface2OrUint8Array::toImpl(isolate, testInterface2OrUint8ArrayMemberValue, testInterface2OrUint8ArrayMember, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL_NOTHROW(V8TestInterface2OrUint8Array::toImpl(isolate, testInterface2OrUint8ArrayMemberValue, testInterface2OrUint8ArrayMember, exceptionState), exceptionState);
impl.setTestInterface2OrUint8ArrayMember(testInterface2OrUint8ArrayMember);
}
@@ -420,7 +420,7 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (unrestrictedDoubleMemberValue.IsEmpty() || unrestrictedDoubleMemberValue->IsUndefined()) {
// Do nothing.
} else {
- TONATIVE_VOID_EXCEPTIONSTATE(double, unrestrictedDoubleMember, toDouble(unrestrictedDoubleMemberValue, exceptionState), exceptionState);
+ TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(double, unrestrictedDoubleMember, toDouble(unrestrictedDoubleMemberValue, exceptionState), exceptionState);
impl.setUnrestrictedDoubleMember(unrestrictedDoubleMember);
}
« no previous file with comments | « Source/bindings/tests/results/core/UnionTypesCore.cpp ('k') | Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698