Index: Source/bindings/tests/results/V8TestInterfacePython.cpp |
diff --git a/Source/bindings/tests/results/V8TestInterfacePython.cpp b/Source/bindings/tests/results/V8TestInterfacePython.cpp |
deleted file mode 100644 |
index 29d6142f43772401745bafeaeffe776129b28d7d..0000000000000000000000000000000000000000 |
--- a/Source/bindings/tests/results/V8TestInterfacePython.cpp |
+++ /dev/null |
@@ -1,1223 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
- |
-#include "config.h" |
-#if ENABLE(CONDITION) |
-#include "V8TestInterfacePython.h" |
- |
-#include "RuntimeEnabledFeatures.h" |
-#include "V8Node.h" |
-#include "V8TestImplementedAs.h" |
-#include "V8TestInterfaceEmpty.h" |
-#include "bindings/tests/idls/TestImplements.h" |
-#include "bindings/tests/idls/TestImplements2Implementation.h" |
-#include "bindings/tests/idls/TestPartialInterfacePython.h" |
-#include "bindings/tests/idls/TestPartialInterfacePythonImplementation.h" |
-#include "bindings/v8/ExceptionState.h" |
-#include "bindings/v8/ScriptValue.h" |
-#include "bindings/v8/V8AbstractEventListener.h" |
-#include "bindings/v8/V8DOMConfiguration.h" |
-#include "bindings/v8/V8EventListenerList.h" |
-#include "bindings/v8/V8HiddenValue.h" |
-#include "bindings/v8/V8ObjectConstructor.h" |
-#include "core/dom/ContextFeatures.h" |
-#include "core/dom/Document.h" |
-#include "platform/TraceEvent.h" |
-#include "wtf/GetPtr.h" |
-#include "wtf/RefPtr.h" |
- |
-namespace WebCore { |
- |
-static void initializeScriptWrappableForInterface(TestInterfacePythonImplementation* object) |
-{ |
- if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
- ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython::wrapperTypeInfo); |
- else |
- ASSERT_NOT_REACHED(); |
-} |
- |
-} // namespace WebCore |
- |
-void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfacePythonImplementation* object) |
-{ |
- WebCore::initializeScriptWrappableForInterface(object); |
-} |
- |
-namespace WebCore { |
-const WrapperTypeInfo V8TestInterfacePython::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfacePython::domTemplate, V8TestInterfacePython::derefObject, V8TestInterfacePython::toActiveDOMObject, 0, V8TestInterfacePython::visitDOMWrapper, V8TestInterfacePython::installPerContextEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObjectPrototype, false }; |
- |
-namespace TestInterfacePythonImplementationV8Internal { |
- |
-template <typename T> void V8_USE(T) { } |
- |
-static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfacePythonAttribute()), impl); |
-} |
- |
-static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfacePythonAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- if (!isUndefinedOrNull(v8Value) && !V8TestInterfacePython::hasInstance(v8Value, info.GetIsolate())) { |
- exceptionState.throwTypeError("The provided value is not of type 'TestInterfacePython'."); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfacePython::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); |
- impl->setTestInterfacePythonAttribute(WTF::getPtr(cppValue)); |
-} |
- |
-static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueString(info, TestInterfacePythonImplementation::staticStringAttribute(), info.GetIsolate()); |
-} |
- |
-static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- TestInterfacePythonImplementation::setStaticStringAttribute(cppValue); |
-} |
- |
-static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.GetIsolate()); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- impl->setPerWorldBindingsStringAttribute(cppValue); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.GetIsolate()); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeGetterForMainWorld(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- impl->setPerWorldBindingsStringAttribute(cppValue); |
-} |
- |
-static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterForMainWorld(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyLongAttribute()); |
-} |
- |
-static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsStaticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueString(info, TestImplements::implementsStaticStringAttribute(), info.GetIsolate()); |
-} |
- |
-static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsStaticStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- TestImplements::setImplementsStaticStringAttribute(cppValue); |
-} |
- |
-static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implementsStaticStringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribute(*impl), info.GetIsolate()); |
-} |
- |
-static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueString(info, TestImplements::implementsStringAttribute(*impl), info.GetIsolate()); |
-} |
- |
-static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- TestImplements::setImplementsStringAttribute(*impl, cppValue); |
-} |
- |
-static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsNodeAttribute(*impl)), impl); |
-} |
- |
-static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- if (!isUndefinedOrNull(v8Value) && !V8Node::hasInstance(v8Value, info.GetIsolate())) { |
- exceptionState.throwTypeError("The provided value is not of type 'Node'."); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); |
- TestImplements::setImplementsNodeAttribute(*impl, WTF::getPtr(cppValue)); |
-} |
- |
-static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- EventListener* v8Value = TestImplements::implementsEventHandlerAttribute(*impl); |
- v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate()))); |
-} |
- |
-static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- moveEventListenerToNewWrapper(holder, TestImplements::implementsEventHandlerAttribute(*impl), v8Value, V8TestInterfacePython::eventListenerCacheIndex, info.GetIsolate()); |
- TestImplements::setImplementsEventHandlerAttribute(*impl, V8EventListenerList::getEventListener(v8Value, true, ListenerFindOrCreate)); |
-} |
- |
-static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsRuntimeEnabledNodeAttribute(*impl)), impl); |
-} |
- |
-static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRuntimeEnabledNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- if (!isUndefinedOrNull(v8Value) && !V8Node::hasInstance(v8Value, info.GetIsolate())) { |
- exceptionState.throwTypeError("The provided value is not of type 'Node'."); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); |
- TestImplements::setImplementsRuntimeEnabledNodeAttribute(*impl, WTF::getPtr(cppValue)); |
-} |
- |
-static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsPerContextEnabledNodeAttribute(*impl)), impl); |
-} |
- |
-static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerContextEnabledNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- if (!isUndefinedOrNull(v8Value) && !V8Node::hasInstance(v8Value, info.GetIsolate())) { |
- exceptionState.throwTypeError("The provided value is not of type 'Node'."); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); |
- TestImplements::setImplementsPerContextEnabledNodeAttribute(*impl, WTF::getPtr(cppValue)); |
-} |
- |
-static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueString(info, TestImplements2Implementation::implements2StaticStringAttribute(), info.GetIsolate()); |
-} |
- |
-static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implements2StaticStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- TestImplements2Implementation::setImplements2StaticStringAttribute(cppValue); |
-} |
- |
-static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implements2StaticStringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements2StringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueString(info, TestImplements2Implementation::implements2StringAttribute(*impl), info.GetIsolate()); |
-} |
- |
-static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- TestImplements2Implementation::setImplements2StringAttribute(*impl, cppValue); |
-} |
- |
-static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements3StringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- v8SetReturnValueString(info, impl->implements3StringAttribute(), info.GetIsolate()); |
-} |
- |
-static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- impl->setImplements3StringAttribute(cppValue); |
-} |
- |
-static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueString(info, TestInterfacePythonImplementation::implements3StaticStringAttribute(), info.GetIsolate()); |
-} |
- |
-static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::implements3StaticStringAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- TestInterfacePythonImplementation::setImplements3StaticStringAttribute(cppValue); |
-} |
- |
-static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::implements3StaticStringAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(*impl)); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), exceptionState); |
- TestPartialInterfacePython::setPartialLongAttribute(*impl, cppValue); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueInt(info, TestPartialInterfacePython::partialStaticLongAttribute()); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialStaticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticLongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), exceptionState); |
- TestPartialInterfacePython::setPartialStaticLongAttribute(cppValue); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()); |
- v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecutionContextLongAttribute(scriptContext, *impl)); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWithExecutionContextLongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), exceptionState); |
- ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()); |
- TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute(scriptContext, *impl, cppValue); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void enumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueString(info, TestPartialInterfacePython::enumAttribute(*impl), info.GetIsolate()); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void enumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::enumAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void enumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
- String string = cppValue; |
- if (!(string == "foo" || string == "bar")) |
- return; |
- TestPartialInterfacePython::setEnumAttribute(*impl, cppValue); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void enumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::enumAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2LongAttribute(*impl)); |
-} |
- |
-static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- v8::Handle<v8::Object> holder = info.Holder(); |
- ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(holder); |
- ASSERT(impl); |
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), exceptionState); |
- TestPartialInterfacePythonImplementation::setPartial2LongAttribute(*impl, cppValue); |
-} |
- |
-static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2StaticLongAttribute()); |
-} |
- |
-static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
- TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttributeGetter(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- ExceptionState exceptionState(ExceptionState::SetterContext, "partial2StaticLongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
- V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), exceptionState); |
- TestPartialInterfacePythonImplementation::setPartial2StaticLongAttribute(cppValue); |
-} |
- |
-static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
- TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttributeSetter(v8Value, info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void TestInterfacePythonImplementationConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Value> data = info.Data(); |
- ASSERT(data->IsExternal()); |
- V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext()); |
- if (!perContextData) |
- return; |
- v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data))); |
-} |
- |
-static void TestInterfacePythonImplementationReplaceableAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- info.This()->ForceSet(name, v8Value); |
-} |
- |
-static void TestInterfacePythonImplementationReplaceableAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
-{ |
- TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementationReplaceableAttributeSetter(name, v8Value, info); |
-} |
- |
-static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); |
- return; |
- } |
- V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
- impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
-} |
- |
-static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- impl->voidMethod(); |
-} |
- |
-static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::voidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- impl->voidMethod(); |
-} |
- |
-static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- ASSERT(impl); |
- TestImplements::implementsVoidMethod(*impl); |
-} |
- |
-static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsComplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate()); |
- if (UNLIKELY(info.Length() < 2)) { |
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
- if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.GetIsolate())) { |
- exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1])); |
- ASSERT(impl); |
- ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()); |
- RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod(scriptContext, *impl, strArg, testInterfaceEmptyArg, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
- return; |
- v8SetReturnValue(info, result.release()); |
-} |
- |
-static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- V8TestInterfacePython::implementsCustomVoidMethodMethodCustom(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestImplements::implementsStaticVoidMethod(); |
-} |
- |
-static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- ASSERT(impl); |
- TestImplements2Implementation::implements2VoidMethod(*impl); |
-} |
- |
-static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- impl->implements3VoidMethod(); |
-} |
- |
-static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::implements3VoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation::implements3StaticVoidMethod(); |
-} |
- |
-static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::implements3StaticVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- ASSERT(impl); |
- TestPartialInterfacePython::partialVoidMethod(*impl); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::partialVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestPartialInterfacePython::partialStaticVoidMethod(); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::partialStaticVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoidMethodLongArg", "TestInterfacePython", info.Holder(), info.GetIsolate()); |
- if (UNLIKELY(info.Length() < 1)) { |
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
- exceptionState.throwIfNeeded(); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState); |
- ASSERT(impl); |
- TestPartialInterfacePython::partialVoidMethodLongArg(*impl, longArg); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCallWithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Holder(), info.GetIsolate()); |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- ASSERT(impl); |
- ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()); |
- TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVoidMethod(scriptContext, *impl, exceptionState); |
- if (exceptionState.throwIfNeeded()) |
- return; |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void methodThatTakesCallbackMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- if (UNLIKELY(info.Length() < 1)) { |
- throwTypeError(ExceptionMessages::failedToExecute("methodThatTakesCallback", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
- return; |
- } |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- V8TRYCATCH_VOID(ScriptValue, callback, ScriptValue(info[0], info.GetIsolate())); |
- ASSERT(impl); |
- TestPartialInterfacePython::methodThatTakesCallback(*impl, callback); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-#if ENABLE(PARTIAL_CONDITION) |
-static void methodThatTakesCallbackMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::methodThatTakesCallbackMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
-#endif // ENABLE(PARTIAL_CONDITION) |
- |
-static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(info.Holder()); |
- ASSERT(impl); |
- TestPartialInterfacePythonImplementation::partial2VoidMethod(*impl); |
-} |
- |
-static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::partial2VoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TestPartialInterfacePythonImplementation::partial2StaticVoidMethod(); |
-} |
- |
-static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestInterfacePythonImplementationV8Internal::partial2StaticVoidMethodMethod(info); |
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
-} |
- |
-} // namespace TestInterfacePythonImplementationV8Internal |
- |
-void V8TestInterfacePython::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate) |
-{ |
- TestInterfacePythonImplementation* impl = fromInternalPointer(object); |
- v8::Local<v8::Object> creationContext = v8::Local<v8::Object>::New(isolate, wrapper); |
- V8WrapperInstantiationScope scope(creationContext, isolate); |
- TestInterfacePythonImplementation* referencedName = impl->referencedName(); |
- if (referencedName) { |
- if (!DOMDataStore::containsWrapper<V8TestInterfacePython>(referencedName, isolate)) |
- wrap(referencedName, creationContext, isolate); |
- DOMDataStore::setWrapperReference<V8TestInterfacePython>(wrapper, referencedName, isolate); |
- } |
- setObjectGroup(object, wrapper, isolate); |
-} |
- |
-static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAttributes[] = { |
- {"testInterfacePythonAttribute", TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"testImplementedAsConstructorAttribute", TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementationConstructorGetter, TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementationReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestImplementedAs::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */}, |
- {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"implementsReadonlyStringAttribute", TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"implementsStringAttribute", TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"implementsNodeAttribute", TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"implementsEventHandlerAttribute", TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"implements3StringAttribute", TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
- {"partial2LongAttribute", TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
-}; |
- |
-static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethods[] = { |
- {"voidMethodTestInterfaceEmptyArg", TestInterfacePythonImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, |
- {"voidMethod", TestInterfacePythonImplementationV8Internal::voidMethodMethodCallback, TestInterfacePythonImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0}, |
- {"implementsVoidMethod", TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethodCallback, 0, 0}, |
- {"implementsComplexMethod", TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethodCallback, 0, 2}, |
- {"implementsCustomVoidMethod", TestInterfacePythonImplementationV8Internal::implementsCustomVoidMethodMethodCallback, 0, 0}, |
- {"implements3VoidMethod", TestInterfacePythonImplementationV8Internal::implements3VoidMethodMethodCallback, 0, 0}, |
- {"partial2VoidMethod", TestInterfacePythonImplementationV8Internal::partial2VoidMethodMethodCallback, 0, 0}, |
-}; |
- |
-static void configureV8TestInterfacePythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate) |
-{ |
- functionTemplate->ReadOnlyPrototype(); |
- |
- v8::Local<v8::Signature> defaultSignature; |
- if (!RuntimeEnabledFeatures::featureNameEnabled()) |
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfacePython::internalFieldCount, 0, 0, 0, 0, 0, 0, isolate); |
- else |
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfacePython", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfacePython::internalFieldCount, |
- V8TestInterfacePythonAttributes, WTF_ARRAY_LENGTH(V8TestInterfacePythonAttributes), |
- 0, 0, |
- V8TestInterfacePythonMethods, WTF_ARRAY_LENGTH(V8TestInterfacePythonMethods), |
- isolate); |
- v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTemplate->InstanceTemplate(); |
- v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTemplate->PrototypeTemplate(); |
- if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) { |
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\ |
- {"implementsRuntimeEnabledNodeAttribute", TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate); |
- } |
- if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { |
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\ |
- {"implements2StringAttribute", TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate); |
- } |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\ |
- {"partialLongAttribute", TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate); |
- } |
-#endif // ENABLE(PARTIAL_CONDITION) |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\ |
- {"partialCallWithExecutionContextLongAttribute", TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate); |
- } |
-#endif // ENABLE(PARTIAL_CONDITION) |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\ |
- {"enumAttribute", TestInterfacePythonImplementationV8Internal::enumAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::enumAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate); |
- } |
-#endif // ENABLE(PARTIAL_CONDITION) |
- static const V8DOMConfiguration::ConstantConfiguration V8TestInterfacePythonConstants[] = { |
- {"UNSIGNED_LONG", 0}, |
- {"IMPLEMENTS_CONSTANT_1", 1}, |
- {"IMPLEMENTS_CONSTANT_2", 2}, |
- {"PARTIAL2_UNSIGNED_SHORT", 0}, |
- }; |
- V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8TestInterfacePythonConstants, WTF_ARRAY_LENGTH(V8TestInterfacePythonConstants), isolate); |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
- static const V8DOMConfiguration::ConstantConfiguration constantConfiguration = {"PARTIAL_UNSIGNED_SHORT", static_cast<signed int>(0)}; |
- V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, &constantConfiguration, 1, isolate); |
- } |
- COMPILE_ASSERT(0 == TestInterfacePythonImplementation::UNSIGNED_LONG, TheValueOfTestInterfacePythonImplementation_UNSIGNED_LONGDoesntMatchWithImplementation); |
- COMPILE_ASSERT(1 == TestImplements::IMPLEMENTS_CONSTANT_1, TheValueOfTestInterfacePythonImplementation_IMPLEMENTS_CONSTANT_1DoesntMatchWithImplementation); |
- COMPILE_ASSERT(2 == TestImplements::IMPLEMENTS_REFLECT_CONSTANT, TheValueOfTestInterfacePythonImplementation_IMPLEMENTS_REFLECT_CONSTANTDoesntMatchWithImplementation); |
- COMPILE_ASSERT(0 == TestPartialInterfacePython::PARTIAL_UNSIGNED_SHORT, TheValueOfTestInterfacePythonImplementation_PARTIAL_UNSIGNED_SHORTDoesntMatchWithImplementation); |
- COMPILE_ASSERT(0 == TestPartialInterfacePythonImplementation::PARTIAL2_UNSIGNED_SHORT, TheValueOfTestInterfacePythonImplementation_PARTIAL2_UNSIGNED_SHORTDoesntMatchWithImplementation); |
- functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfacePython::legacyCallCustom); |
- functionTemplate->Set(v8AtomicString(isolate, "implementsStaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
- if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) |
- prototypeTemplate->Set(v8AtomicString(isolate, "implements2VoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); |
- functionTemplate->Set(v8AtomicString(isolate, "implements3StaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::implements3StaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
- prototypeTemplate->Set(v8AtomicString(isolate, "partialVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::partialVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); |
-#endif // ENABLE(PARTIAL_CONDITION) |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
- functionTemplate->Set(v8AtomicString(isolate, "partialStaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::partialStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
-#endif // ENABLE(PARTIAL_CONDITION) |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
- prototypeTemplate->Set(v8AtomicString(isolate, "partialVoidMethodLongArg"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethodCallback, v8Undefined(), defaultSignature, 1)); |
-#endif // ENABLE(PARTIAL_CONDITION) |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
- prototypeTemplate->Set(v8AtomicString(isolate, "partialCallWithExecutionContextRaisesExceptionVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); |
-#endif // ENABLE(PARTIAL_CONDITION) |
-#if ENABLE(PARTIAL_CONDITION) |
- if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
- prototypeTemplate->Set(v8AtomicString(isolate, "methodThatTakesCallback"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::methodThatTakesCallbackMethodCallback, v8Undefined(), defaultSignature, 1)); |
-#endif // ENABLE(PARTIAL_CONDITION) |
- functionTemplate->Set(v8AtomicString(isolate, "partial2StaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::partial2StaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsStaticReadOnlyLongAttribute"), TestInterfacePythonImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsStaticStringAttribute"), TestInterfacePythonImplementationV8Internal::implementsStaticStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2StaticStringAttribute"), TestInterfacePythonImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements3StaticStringAttribute"), TestInterfacePythonImplementationV8Internal::implements3StaticStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implements3StaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
-#if ENABLE(PARTIAL_CONDITION) |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partialStaticLongAttribute"), TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
-#endif // ENABLE(PARTIAL_CONDITION) |
- functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partial2StaticLongAttribute"), TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
- |
- // Custom toString template |
- functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate()); |
-} |
- |
-v8::Handle<v8::FunctionTemplate> V8TestInterfacePython::domTemplate(v8::Isolate* isolate) |
-{ |
- V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
- v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo)); |
- if (!result.IsEmpty()) |
- return result; |
- |
- TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
- result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode); |
- configureV8TestInterfacePythonTemplate(result, isolate); |
- data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result); |
- return result; |
-} |
- |
-bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
-{ |
- return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value); |
-} |
- |
-v8::Handle<v8::Object> V8TestInterfacePython::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
-{ |
- return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value); |
-} |
- |
-TestInterfacePythonImplementation* V8TestInterfacePython::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
-{ |
- return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; |
-} |
- |
-void V8TestInterfacePython::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestInterfacePythonImplementation* impl, v8::Isolate* isolate) |
-{ |
- v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instanceTemplate->GetPrototype()); |
- if (ContextFeatures::implementsContextNameEnabled(impl->document())) { |
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\ |
- {"implementsPerContextEnabledNodeAttribute", TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate); |
- } |
-} |
- |
-ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object> wrapper) |
-{ |
- return toNative(wrapper); |
-} |
- |
-void V8TestInterfacePython::derefObject(void* object) |
-{ |
- fromInternalPointer(object)->deref(); |
-} |
- |
-template<> |
-v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
-{ |
- return toV8(impl, creationContext, isolate); |
-} |
- |
-} // namespace WebCore |
-#endif // ENABLE(CONDITION) |