X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fbindings%2Ftests%2Fresults%2FV8TestInterfaceConstructor2.cpp;h=aa92daa0ecefe44b34f1112f8e240904b802c58b;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=f22ea7341538d920a679bfe7b702229a867d4159;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp b/src/third_party/WebKit/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp index f22ea73..aa92daa 100644 --- a/src/third_party/WebKit/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp +++ b/src/third_party/WebKit/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp @@ -42,6 +42,8 @@ #include "core/dom/ContextFeatures.h" #include "core/dom/Document.h" #include "platform/TraceEvent.h" +#include "wtf/GetPtr.h" +#include "wtf/RefPtr.h" namespace WebCore { @@ -65,7 +67,7 @@ void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceConstruc } namespace WebCore { -const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype }; +const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; namespace TestInterfaceConstructor2V8Internal { @@ -83,15 +85,18 @@ static void constructor1(const v8::FunctionCallbackInfo& info) static void constructor2(const v8::FunctionCallbackInfo& info) { + ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceConstructor2", info.Holder(), info.GetIsolate()); V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle::Cast(info[0])) : 0); - V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOptionalStringArg, info[1]); - V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOptionalStringArg, argumentOrNull(info, 2)); - V8TRYCATCH_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionary(info[3], info.GetIsolate())); + V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState); + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOptionalStringArg, info[2]); + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOptionalStringArg, argumentOrNull(info, 3)); + V8TRYCATCH_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionary(info[4], info.GetIsolate())); if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUndefinedOptionalDictionaryArg.isObject()) { - throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstructor2", "parameter 4 ('defaultUndefinedOptionalDictionaryArg') is not an object."), info.GetIsolate()); + exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDictionaryArg') is not an object."); + exceptionState.throwIfNeeded(); return; } - RefPtr impl = TestInterfaceConstructor2::create(testInterfaceEmptyArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); + RefPtr impl = TestInterfaceConstructor2::create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); v8::Handle wrapper = info.Holder(); V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dependent); @@ -104,7 +109,7 @@ static void constructor(const v8::FunctionCallbackInfo& info) TestInterfaceConstructor2V8Internal::constructor1(info); return; } - if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 2) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 3) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 4) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) && (info[3]->IsObject()))) { + if (((info.Length() == 2) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 3) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 4) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 5) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) && (info[4]->IsUndefined() || info[4]->IsObject()))) { TestInterfaceConstructor2V8Internal::constructor2(info); return; }