| 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 f097bbb14ae8161fd642ed4ce1a985c40578093e..2c74a5e0fbbf8744db01a6aa964f3c1d1df50839 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
|
| @@ -135,10 +135,16 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| V8StringResource<> arg;
|
| V8StringResource<> optArg;
|
| {
|
| + int numArgsPassed = info.Length();
|
| + while (numArgsPassed > 0) {
|
| + if (!info[numArgsPassed - 1]->IsUndefined())
|
| + break;
|
| + --numArgsPassed;
|
| + }
|
| arg = info[0];
|
| if (!arg.prepare())
|
| return;
|
| - if (UNLIKELY(info.Length() <= 1)) {
|
| + if (UNLIKELY(numArgsPassed <= 1)) {
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
|
| @@ -291,10 +297,16 @@ static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
|
| V8StringResource<> arg;
|
| V8StringResource<> optArg;
|
| {
|
| + int numArgsPassed = info.Length();
|
| + while (numArgsPassed > 0) {
|
| + if (!info[numArgsPassed - 1]->IsUndefined())
|
| + break;
|
| + --numArgsPassed;
|
| + }
|
| arg = info[0];
|
| if (!arg.prepare())
|
| return;
|
| - if (UNLIKELY(info.Length() <= 1)) {
|
| + if (UNLIKELY(numArgsPassed <= 1)) {
|
| ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
|
|
|