Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp |
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp |
index 70af33f15e84cd0c67fced77ee9cf556421cdbea..f139f96628a18b161341b6a37766237981e5ca07 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp |
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp |
@@ -47,7 +47,6 @@ static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptState, executionContext, document, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -69,46 +68,49 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
{ |
doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
stringArg = info[1]; |
- if (!stringArg.prepare()) |
+ if (!stringArg.prepare()) { |
return; |
+ } |
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[2]); |
if (!testInterfaceEmptyArg) { |
exceptionState.throwTypeError("parameter 3 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) { |
exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an object."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
dictionaryArg = Dictionary(info[3], info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
sequenceStringArg = toImplArray<Vector<String>>(info[4], 5, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
sequenceDictionaryArg = toImplArray<Vector<Dictionary>>(info[5], 6, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
sequenceLongOrTestDictionaryArg = toImplArray<HeapVector<LongOrTestDictionary>>(info[6], 7, info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
if (!isUndefinedOrNull(info[7]) && !info[7]->IsObject()) { |
exceptionState.throwTypeError("parameter 8 ('optionalDictionaryArg') is not an object."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
optionalDictionaryArg = Dictionary(info[7], info.GetIsolate(), exceptionState); |
- if (exceptionState.throwIfNeeded()) |
+ if (exceptionState.hadException()) { |
return; |
+ } |
optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[8]); |
if (!optionalTestInterfaceEmptyArg) { |
exceptionState.throwTypeError("parameter 9 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
return; |
} |
} |
@@ -117,7 +119,6 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, sequenceLongOrTestDictionaryArg, optionalDictionaryArg, optionalTestInterfaceEmptyArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -138,15 +139,15 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
--numArgsPassed; |
} |
arg = info[0]; |
- if (!arg.prepare()) |
+ if (!arg.prepare()) { |
return; |
+ } |
if (UNLIKELY(numArgsPassed <= 1)) { |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptState, executionContext, document, arg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -155,15 +156,15 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
return; |
} |
optArg = info[1]; |
- if (!optArg.prepare()) |
+ if (!optArg.prepare()) { |
return; |
+ } |
} |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptState, executionContext, document, arg, optArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -179,21 +180,23 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
V8StringResource<> arg3; |
{ |
arg = info[0]; |
- if (!arg.prepare()) |
+ if (!arg.prepare()) { |
return; |
+ } |
arg2 = info[1]; |
- if (!arg2.prepare()) |
+ if (!arg2.prepare()) { |
return; |
+ } |
arg3 = info[2]; |
- if (!arg3.prepare()) |
+ if (!arg3.prepare()) { |
return; |
+ } |
} |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptState, executionContext, document, arg, arg2, arg3, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -250,15 +253,12 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
default: |
if (info.Length() >= 0) { |
setArityTypeError(exceptionState, "[0, 1, 2, 3, 7, 8, 9]", info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, info.Length())); |
- exceptionState.throwIfNeeded(); |
return; |
} |
exceptionState.throwTypeError("No matching constructor signature."); |
- exceptionState.throwIfNeeded(); |
} |
} // namespace TestInterfaceConstructorV8Internal |
@@ -288,7 +288,6 @@ static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall |
ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceConstructor", info.Holder(), info.GetIsolate()); |
if (UNLIKELY(info.Length() < 1)) { |
setMinimumArityTypeError(exceptionState, 1, info.Length()); |
- exceptionState.throwIfNeeded(); |
return; |
} |
V8StringResource<> arg; |
@@ -301,15 +300,15 @@ static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall |
--numArgsPassed; |
} |
arg = info[0]; |
- if (!arg.prepare()) |
+ if (!arg.prepare()) { |
return; |
+ } |
if (UNLIKELY(numArgsPassed <= 1)) { |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::createForJSConstructor(scriptState, executionContext, document, arg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |
@@ -318,15 +317,15 @@ static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall |
return; |
} |
optArg = info[1]; |
- if (!optArg.prepare()) |
+ if (!optArg.prepare()) { |
return; |
+ } |
} |
ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); |
TestInterfaceConstructor* impl = TestInterfaceConstructor::createForJSConstructor(scriptState, executionContext, document, arg, optArg, exceptionState); |
if (exceptionState.hadException()) { |
- exceptionState.throwIfNeeded(); |
return; |
} |
v8::Local<v8::Object> wrapper = info.Holder(); |