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

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

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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: third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
index 660836089f99c4eb733cb6d7aec2dd23f56e9ac6..1761a98ed172b74c3c8f72525988d9f6b63b85af 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -62,8 +62,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setBooleanMember(booleanMember);
}
@@ -76,8 +77,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
bool create = toBoolean(isolate, createValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setCreateMember(create);
}
@@ -91,8 +93,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} else {
Deprecation::countDeprecationIfNotPrivateScript(isolate, currentExecutionContext(isolate), UseCounter::CreateMember);
bool deprecatedCreateMember = toBoolean(isolate, deprecatedCreateMemberValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setCreateMember(deprecatedCreateMember);
}
@@ -105,8 +108,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
Dictionary dictionaryMember = Dictionary(dictionaryMemberValue, isolate, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
if (!dictionaryMember.isObject()) {
exceptionState.throwTypeError("member dictionaryMember is not an object.");
return;
@@ -125,8 +129,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
impl.setDoubleOrNullMemberToNull();
} else {
double doubleOrNullMember = toRestrictedDouble(isolate, doubleOrNullMemberValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setDoubleOrNullMember(doubleOrNullMember);
}
@@ -140,8 +145,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} else {
DoubleOrString doubleOrStringMember;
V8DoubleOrString::toImpl(isolate, doubleOrStringMemberValue, doubleOrStringMember, UnionTypeConversionMode::NotNullable, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setDoubleOrStringMember(doubleOrStringMember);
}
@@ -154,8 +160,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
HeapVector<DoubleOrString> doubleOrStringSequenceMember = toImplArray<HeapVector<DoubleOrString>>(doubleOrStringSequenceMemberValue, 0, isolate, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setDoubleOrStringSequenceMember(doubleOrStringSequenceMember);
}
@@ -186,8 +193,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
V8StringResource<> enumMember = enumMemberValue;
- if (!enumMember.prepare(exceptionState))
+ if (!enumMember.prepare(exceptionState)) {
return;
+ }
const char* validValues[] = {
"",
"EnumValue1",
@@ -208,8 +216,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
Vector<String> enumSequenceMember = toImplArray<Vector<String>>(enumSequenceMemberValue, 0, isolate, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
const char* validValues[] = {
"",
"EnumValue1",
@@ -246,8 +255,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
HeapVector<InternalDictionary> internalDictionarySequenceMember = toImplArray<HeapVector<InternalDictionary>>(internalDictionarySequenceMemberValue, 0, isolate, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setInternalDictionarySequenceMember(internalDictionarySequenceMember);
}
@@ -260,8 +270,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
int longMember = toInt32(isolate, longMemberValue, NormalConversion, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setLongMember(longMember);
}
@@ -309,8 +320,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} else {
DoubleOrString otherDoubleOrStringMember;
V8DoubleOrString::toImpl(isolate, otherDoubleOrStringMemberValue, otherDoubleOrStringMember, UnionTypeConversionMode::NotNullable, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setOtherDoubleOrStringMember(otherDoubleOrStringMember);
}
@@ -323,8 +335,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
double restrictedDoubleMember = toRestrictedDouble(isolate, restrictedDoubleMemberValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setRestrictedDoubleMember(restrictedDoubleMember);
}
@@ -338,8 +351,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
bool runtimeMember = toBoolean(isolate, runtimeMemberValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setRuntimeMember(runtimeMember);
}
}
@@ -353,8 +367,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
Vector<String> stringArrayMember = toImplArray<Vector<String>>(stringArrayMemberValue, 0, isolate, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setStringArrayMember(stringArrayMember);
}
@@ -367,8 +382,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
V8StringResource<> stringMember = stringMemberValue;
- if (!stringMember.prepare(exceptionState))
+ if (!stringMember.prepare(exceptionState)) {
return;
+ }
impl.setStringMember(stringMember);
}
@@ -383,8 +399,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
impl.setStringOrNullMemberToNull();
} else {
V8StringResource<> stringOrNullMember = stringOrNullMemberValue;
- if (!stringOrNullMember.prepare(exceptionState))
+ if (!stringOrNullMember.prepare(exceptionState)) {
return;
+ }
impl.setStringOrNullMember(stringOrNullMember);
}
@@ -397,8 +414,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
Vector<String> stringSequenceMember = toImplArray<Vector<String>>(stringSequenceMemberValue, 0, isolate, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setStringSequenceMember(stringSequenceMember);
}
@@ -412,8 +430,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} else {
TestInterface2OrUint8Array testInterface2OrUint8ArrayMember;
V8TestInterface2OrUint8Array::toImpl(isolate, testInterface2OrUint8ArrayMemberValue, testInterface2OrUint8ArrayMember, UnionTypeConversionMode::NotNullable, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setTestInterface2OrUint8ArrayMember(testInterface2OrUint8ArrayMember);
}
@@ -460,8 +479,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollectedSequenceMember = (toMemberNativeArray<TestInterfaceGarbageCollected>(testInterfaceGarbageCollectedSequenceMemberValue, 0, isolate, exceptionState));
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setTestInterfaceGarbageCollectedSequenceMember(testInterfaceGarbageCollectedSequenceMember);
}
@@ -508,8 +528,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
HeapVector<Member<TestInterfaceImplementation>> testInterfaceSequenceMember = (toMemberNativeArray<TestInterface>(testInterfaceSequenceMemberValue, 0, isolate, exceptionState));
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setTestInterfaceSequenceMember(testInterfaceSequenceMember);
}
@@ -538,8 +559,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
// Do nothing.
} else {
double unrestrictedDoubleMember = toDouble(isolate, unrestrictedDoubleMemberValue, exceptionState);
- if (exceptionState.hadException())
+ if (exceptionState.hadException()) {
return;
+ }
impl.setUnrestrictedDoubleMember(unrestrictedDoubleMember);
}

Powered by Google App Engine
This is Rietveld 408576698