Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp |
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp |
index 9d1582a226a1d6b3f85add3c54f6d2c90f39ef27..e1ae63b7024e634807d9943e73cb3f864bf26e58 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp |
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp |
@@ -41,8 +41,9 @@ static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
V8StringResource<> stringArg; |
{ |
stringArg = info[0]; |
- if (!stringArg.prepare()) |
+ if (!stringArg.prepare()) { |
return; |
+ } |
} |
TestInterfaceConstructor2* impl = TestInterfaceConstructor2::create(stringArg); |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -57,12 +58,12 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
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; |
+ } |
} |
TestInterfaceConstructor2* impl = TestInterfaceConstructor2::create(dictionaryArg); |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -76,8 +77,9 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
Vector<Vector<String>> stringSequenceSequenceArg; |
{ |
stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0], 1, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
} |
TestInterfaceConstructor2* impl = TestInterfaceConstructor2::create(stringSequenceSequenceArg); |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -104,30 +106,32 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
if (!testInterfaceEmptyArg) { |
exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
defaultUndefinedOptionalStringArg = info[2]; |
- if (!defaultUndefinedOptionalStringArg.prepare()) |
+ if (!defaultUndefinedOptionalStringArg.prepare()) { |
return; |
+ } |
if (!info[3]->IsUndefined()) { |
defaultNullStringOptionalStringArg = info[3]; |
- if (!defaultNullStringOptionalStringArg.prepare()) |
+ if (!defaultNullStringOptionalStringArg.prepare()) { |
return; |
+ } |
} else { |
defaultNullStringOptionalStringArg = nullptr; |
} |
if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { |
exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDictionaryArg') is not an object."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
defaultUndefinedOptionalDictionaryArg = Dictionary(info[4], info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
if (UNLIKELY(numArgsPassed <= 5)) { |
TestInterfaceConstructor2* impl = TestInterfaceConstructor2::create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -136,8 +140,9 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
return; |
} |
optionalStringArg = info[5]; |
- if (!optionalStringArg.prepare()) |
+ if (!optionalStringArg.prepare()) { |
return; |
+ } |
} |
TestInterfaceConstructor2* impl = TestInterfaceConstructor2::create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -195,11 +200,9 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
break; |
default: |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No matching constructor signature."); |
- exceptionState.throwIfNeeded(); |
} |
} // namespace TestInterfaceConstructor2V8Internal |