| Index: Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp b/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp
|
| index 7eb21867bbd4db3550068d473420e0e2b3e221d9..f9a5aee67400043c1c1ae60b4b568b8dd6652d0b 100644
|
| --- a/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp
|
| +++ b/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp
|
| @@ -8,6 +8,7 @@
|
| #include "V8TestInterfaceNamedConstructor.h"
|
|
|
| #include "bindings/core/v8/ExceptionState.h"
|
| +#include "bindings/core/v8/Optional.h"
|
| #include "bindings/core/v8/V8DOMConfiguration.h"
|
| #include "bindings/core/v8/V8HiddenValue.h"
|
| #include "bindings/core/v8/V8ObjectConstructor.h"
|
| @@ -90,39 +91,47 @@ static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
|
| return;
|
| }
|
| V8StringResource<> stringArg;
|
| - bool defaultUndefinedOptionalBooleanArg;
|
| - int defaultUndefinedOptionalLongArg;
|
| - V8StringResource<> defaultUndefinedOptionalStringArg;
|
| + bool optionalBooleanArg = false;
|
| + bool optionalBooleanArgMissing = false;
|
| + int optionalLongArg = 0;
|
| + bool optionalLongArgMissing = false;
|
| + V8StringResource<> optionalStringArg;
|
| + bool optionalStringArgMissing = false;
|
| V8StringResource<> defaultNullStringOptionalstringArg;
|
| V8StringResource<> optionalStringArg;
|
| + bool optionalStringArgMissing = false;
|
| {
|
| v8::TryCatch block;
|
| V8RethrowTryCatchScope rethrow(block);
|
| TOSTRING_VOID_INTERNAL(stringArg, info[0]);
|
| - TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalBooleanArg, info[1]->BooleanValue());
|
| - TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalLongArg, toInt32(info[2], exceptionState), exceptionState);
|
| - TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[3]);
|
| + if (!info[1]->IsUndefined()) {
|
| + TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[1]->BooleanValue());
|
| + } else {
|
| + optionalBooleanArgMissing = true;
|
| + }
|
| + if (!info[2]->IsUndefined()) {
|
| + TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[2], exceptionState), exceptionState);
|
| + } else {
|
| + optionalLongArgMissing = true;
|
| + }
|
| + if (!info[3]->IsUndefined()) {
|
| + TOSTRING_VOID_INTERNAL(optionalStringArg, info[3]);
|
| + } else {
|
| + optionalStringArgMissing = true;
|
| + }
|
| if (!info[4]->IsUndefined()) {
|
| TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]);
|
| } else {
|
| defaultNullStringOptionalstringArg = nullptr;
|
| }
|
| - if (UNLIKELY(info.Length() <= 5)) {
|
| - Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
|
| - RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalstringArg, exceptionState);
|
| - if (exceptionState.hadException()) {
|
| - exceptionState.throwIfNeeded();
|
| - return;
|
| - }
|
| - v8::Handle<v8::Object> wrapper = info.Holder();
|
| - V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(impl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dependent);
|
| - v8SetReturnValue(info, wrapper);
|
| - return;
|
| + if (!info[5]->IsUndefined()) {
|
| + TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]);
|
| + } else {
|
| + optionalStringArgMissing = true;
|
| }
|
| - TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]);
|
| }
|
| Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
|
| - RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalstringArg, optionalStringArg, exceptionState);
|
| + RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::createForJSConstructor(document, stringArg, Optional<bool>(optionalBooleanArg, optionalBooleanArgMissing), Optional<int>(optionalLongArg, optionalLongArgMissing), Optional<V8StringResource<> >(optionalStringArg, optionalStringArgMissing), defaultNullStringOptionalstringArg, Optional<V8StringResource<> >(optionalStringArg, optionalStringArgMissing), exceptionState);
|
| if (exceptionState.hadException()) {
|
| exceptionState.throwIfNeeded();
|
| return;
|
|
|