X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fbindings%2Ftests%2Fresults%2Fcore%2FV8TestInterfaceEventConstructor.cpp;h=69c57d6d16b7f32efcbbced57d7d041ef8e37937;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=3ceb0b25b6f955492ba9b1afcbe8115e71138866;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp b/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp index 3ceb0b2..69c57d6 100644 --- a/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp +++ b/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp @@ -15,7 +15,7 @@ #include "bindings/core/v8/V8HiddenValue.h" #include "bindings/core/v8/V8ObjectConstructor.h" #include "bindings/core/v8/V8TestInterfaceEmpty.h" -#include "bindings/core/v8/custom/V8Uint8ArrayCustom.h" +#include "bindings/core/v8/V8Uint8Array.h" #include "core/dom/ContextFeatures.h" #include "core/dom/Document.h" #include "core/frame/LocalDOMWindow.h" @@ -27,7 +27,7 @@ namespace blink { -const WrapperTypeInfo V8TestInterfaceEventConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceEventConstructor::domTemplate, V8TestInterfaceEventConstructor::refObject, V8TestInterfaceEventConstructor::derefObject, V8TestInterfaceEventConstructor::createPersistentHandle, 0, 0, 0, V8TestInterfaceEventConstructor::installConditionallyEnabledMethods, V8TestInterfaceEventConstructor::installConditionallyEnabledProperties, &V8Event::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; +const WrapperTypeInfo V8TestInterfaceEventConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceEventConstructor::domTemplate, V8TestInterfaceEventConstructor::refObject, V8TestInterfaceEventConstructor::derefObject, V8TestInterfaceEventConstructor::trace, 0, 0, 0, V8TestInterfaceEventConstructor::installConditionallyEnabledMethods, V8TestInterfaceEventConstructor::installConditionallyEnabledProperties, &V8Event::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfaceEventConstructor.h. // For details, see the comment of DEFINE_WRAPPERTYPEINFO in @@ -36,8 +36,6 @@ const WrapperTypeInfo& TestInterfaceEventConstructor::s_wrapperTypeInfo = V8Test namespace TestInterfaceEventConstructorV8Internal { -template void V8_USE(T) { } - static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo& info) { v8::Handle holder = info.Holder(); @@ -112,8 +110,8 @@ static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet { v8::Handle holder = info.Holder(); TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toImpl(holder); - RefPtr cppValue(impl->initializedByEventConstructorReadonlyUint8ArrayAttribute()); - if (cppValue && DOMDataStore::setReturnValueFromWrapper(info.GetReturnValue(), cppValue.get())) + RefPtr cppValue(impl->initializedByEventConstructorReadonlyUint8ArrayAttribute()); + if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue.get())) return; v8::Handle wrapper = toV8(cppValue.get(), holder, info.GetIsolate()); if (!wrapper.IsEmpty()) { @@ -134,7 +132,7 @@ static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr v8::Handle holder = info.Holder(); TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toImpl(holder); RefPtr cppValue(impl->initializedByEventConstructorReadonlyTestInterfaceEmptyAttribute()); - if (cppValue && DOMDataStore::setReturnValueFromWrapper(info.GetReturnValue(), cppValue.get())) + if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue.get())) return; v8::Handle wrapper = toV8(cppValue.get(), holder, info.GetIsolate()); if (!wrapper.IsEmpty()) { @@ -169,7 +167,7 @@ static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri v8::Handle holder = info.Holder(); TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toImpl(holder); RefPtr cppValue(impl->initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute()); - if (cppValue && DOMDataStore::setReturnValueFromWrapper(info.GetReturnValue(), cppValue.get())) + if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue.get())) return; v8::Handle wrapper = toV8(cppValue.get(), holder, info.GetIsolate()); if (!wrapper.IsEmpty()) { @@ -195,7 +193,7 @@ static void deprecatedInitializedByEventConstructorReadonlyStringAttributeAttrib static void deprecatedInitializedByEventConstructorReadonlyStringAttributeAttributeGetterCallback(v8::Local, const v8::PropertyCallbackInfo& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); - UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); + UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); TestInterfaceEventConstructorV8Internal::deprecatedInitializedByEventConstructorReadonlyStringAttributeAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } @@ -224,7 +222,7 @@ static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAt static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttributeAttributeGetterCallback(v8::Local, const v8::PropertyCallbackInfo& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); - UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); + UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); TestInterfaceEventConstructorV8Internal::deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttributeAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } @@ -256,7 +254,7 @@ static void constructor(const v8::FunctionCallbackInfo& info) return; if (DOMWrapperWorld::current(info.GetIsolate()).isIsolatedWorld()) { if (!initializedByEventConstructorReadonlyAnyAttribute.IsEmpty()) - event->setSerializedInitializedByEventConstructorReadonlyAnyAttribute(SerializedScriptValue::createAndSwallowExceptions(initializedByEventConstructorReadonlyAnyAttribute, info.GetIsolate())); + event->setSerializedInitializedByEventConstructorReadonlyAnyAttribute(SerializedScriptValue::createAndSwallowExceptions(info.GetIsolate(), initializedByEventConstructorReadonlyAnyAttribute)); } v8::Handle wrapper = info.Holder(); @@ -303,7 +301,7 @@ bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit& return false; if (DictionaryHelper::convert(options, conversionContext.setConversionType("DOMString", false), "deprecatedInitializedByEventConstructorReadonlyStringAttribute", eventInit.deprecatedInitializedByEventConstructorReadonlyStringAttribute)) { if (options.hasProperty("deprecatedInitializedByEventConstructorReadonlyStringAttribute")) - UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); + UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); } else { return false; } @@ -311,7 +309,7 @@ bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit& return false; if (DictionaryHelper::convert(options, conversionContext.setConversionType("DOMString", false), "deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttribute", eventInit.deprecatedImplementedAsName)) { if (options.hasProperty("deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttribute")) - UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); + UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::initializedByEventConstructorReadonlyStringAttribute); } else { return false; } @@ -322,7 +320,7 @@ void V8TestInterfaceEventConstructor::constructorCallback(const v8::FunctionCall { TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); if (!info.IsConstructCall()) { - V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("TestInterfaceEventConstructor"), info.GetIsolate()); + V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::constructorNotCallableAsFunction("TestInterfaceEventConstructor")); return; } @@ -346,8 +344,10 @@ static void installV8TestInterfaceEventConstructorTemplate(v8::HandleSetCallHandler(V8TestInterfaceEventConstructor::constructorCallback); functionTemplate->SetLength(1); - v8::Local instanceTemplate ALLOW_UNUSED = functionTemplate->InstanceTemplate(); - v8::Local prototypeTemplate ALLOW_UNUSED = functionTemplate->PrototypeTemplate(); + v8::Local instanceTemplate = functionTemplate->InstanceTemplate(); + ALLOW_UNUSED_LOCAL(instanceTemplate); + v8::Local prototypeTemplate = functionTemplate->PrototypeTemplate(); + ALLOW_UNUSED_LOCAL(prototypeTemplate); // Custom toString template functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate()); @@ -373,28 +373,17 @@ TestInterfaceEventConstructor* V8TestInterfaceEventConstructor::toImplWithTypeCh return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle::Cast(value))->toImpl() : 0; } - -void V8TestInterfaceEventConstructor::refObject(ScriptWrappableBase* internalPointer) +void V8TestInterfaceEventConstructor::refObject(ScriptWrappableBase* scriptWrappableBase) { #if !ENABLE(OILPAN) - internalPointer->toImpl()->ref(); + scriptWrappableBase->toImpl()->ref(); #endif } -void V8TestInterfaceEventConstructor::derefObject(ScriptWrappableBase* internalPointer) +void V8TestInterfaceEventConstructor::derefObject(ScriptWrappableBase* scriptWrappableBase) { #if !ENABLE(OILPAN) - internalPointer->toImpl()->deref(); -#endif -} - -WrapperPersistentNode* V8TestInterfaceEventConstructor::createPersistentHandle(ScriptWrappableBase* internalPointer) -{ -#if ENABLE(OILPAN) - return WrapperPersistent::create(internalPointer->toImpl()); -#else - ASSERT_NOT_REACHED(); - return 0; + scriptWrappableBase->toImpl()->deref(); #endif }