| /* |
| This file is part of the Blink open source project. |
| This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| |
| This library is free software; you can redistribute it and/or |
| modify it under the terms of the GNU Library General Public |
| License as published by the Free Software Foundation; either |
| version 2 of the License, or (at your option) any later version. |
| |
| This library is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| Library General Public License for more details. |
| |
| You should have received a copy of the GNU Library General Public License |
| along with this library; see the file COPYING.LIB. If not, write to |
| the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| Boston, MA 02111-1307, USA. |
| */ |
| |
| #include "config.h" |
| #if ENABLE(Condition1) || ENABLE(Condition2) |
| #include "V8TestInterface.h" |
| |
| #include "RuntimeEnabledFeatures.h" |
| #include "V8Node.h" |
| #include "V8NodeList.h" |
| #include "V8TestObject.h" |
| #include "bindings/bindings/tests/idls/TestImplements.h" |
| #include "bindings/bindings/tests/idls/TestPartialInterface.h" |
| #include "bindings/v8/ExceptionState.h" |
| #include "bindings/v8/ScriptController.h" |
| #include "bindings/v8/V8Binding.h" |
| #include "bindings/v8/V8DOMConfiguration.h" |
| #include "bindings/v8/V8DOMWrapper.h" |
| #include "bindings/v8/V8ObjectConstructor.h" |
| #include "core/dom/ContextFeatures.h" |
| #include "core/dom/Document.h" |
| #include "core/page/Frame.h" |
| #include "core/platform/chromium/TraceEvent.h" |
| #include "wtf/GetPtr.h" |
| #include "wtf/RefPtr.h" |
| #include "wtf/UnusedParam.h" |
| |
| namespace WebCore { |
| |
| static void initializeScriptWrappableForInterface(TestInterface* object) |
| { |
| if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| ScriptWrappable::setTypeInfoInObject(object, &V8TestInterface::info); |
| else |
| ASSERT_NOT_REACHED(); |
| } |
| |
| } // namespace WebCore |
| |
| // In ScriptWrappable::init, the use of a local function declaration has an issue on Windows: |
| // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function |
| // in the global namespace. |
| // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object) |
| { |
| WebCore::initializeScriptWrappableForInterface(object); |
| } |
| |
| namespace WebCore { |
| WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestInterface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0, V8TestInterface::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype }; |
| |
| namespace TestInterfaceV8Internal { |
| |
| template <typename T> void V8_USE(T) { } |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStaticReadOnlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| v8SetReturnValueString(info, TestImplements::implementsStaticAttr(), info.GetIsolate()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStaticAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::implementsStaticAttrAttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| TestImplements::setImplementsStaticAttr(v); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::implementsStaticAttrAttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValueString(info, TestImplements::implementsStr1(imp), info.GetIsolate()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::implementsStr1AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValueString(info, TestImplements::implementsStr2(imp), info.GetIsolate()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::implementsStr2AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| TestImplements::setImplementsStr2(imp, v); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::implementsStr2AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr3AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| V8TestInterface::implementsStr3AttrGetterCustom(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| V8TestInterface::implementsStr3AttrSetterCustom(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsNodeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestImplements::implementsNode(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsNodeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::implementsNodeAttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestImplements::setImplementsNode(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsNodeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::implementsNodeAttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node23AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestImplements::node23(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node23AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::Node23AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node23AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestImplements::setNode23(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node23AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::Node23AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node24AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestImplements::node24(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node24AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::Node24AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node24AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestImplements::setNode24(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node24AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::Node24AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node25AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestImplements::node25(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node25AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::Node25AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node25AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestImplements::setNode25(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void Node25AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::Node25AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAttr()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStaticReadOnlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| v8SetReturnValueString(info, TestPartialInterface::supplementalStaticAttr(), info.GetIsolate()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStaticAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::supplementalStaticAttrAttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| TestPartialInterface::setSupplementalStaticAttr(v); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::supplementalStaticAttrAttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValueString(info, TestPartialInterface::supplementalStr1(imp), info.GetIsolate()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::supplementalStr1AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValueString(info, TestPartialInterface::supplementalStr2(imp), info.GetIsolate()); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::supplementalStr2AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); |
| TestPartialInterface::setSupplementalStr2(imp, v); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::supplementalStr2AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr3AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| V8TestInterface::supplementalStr3AttrGetterCustom(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| V8TestInterface::supplementalStr3AttrSetterCustom(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalNodeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestPartialInterface::supplementalNode(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalNodeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::supplementalNodeAttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalNodeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::supplementalNodeAttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node13AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestPartialInterface::node13(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node13AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::Node13AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node13AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestPartialInterface::setNode13(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node13AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::Node13AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node14AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestPartialInterface::node14(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node14AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::Node14AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node14AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestPartialInterface::setNode14(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node14AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::Node14AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node15AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| v8SetReturnValue(info, toV8Fast(TestPartialInterface::node15(imp), info, imp)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node15AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| TestInterfaceV8Internal::Node15AttrGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node15AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
| V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0); |
| TestPartialInterface::setNode15(imp, WTF::getPtr(v)); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void Node15AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| TestInterfaceV8Internal::Node15AttrSetter(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TestInterface* imp = V8TestInterface::toNative(args.Holder()); |
| TestImplements::implementsMethod1(imp); |
| |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| TestInterfaceV8Internal::implementsMethod1Method(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| if (args.Length() < 2) { |
| throwNotEnoughArgumentsError(args.GetIsolate()); |
| return; |
| } |
| TestInterface* imp = V8TestInterface::toNative(args.Holder()); |
| ExceptionState es(args.GetIsolate()); |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0); |
| ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| RefPtr<TestObj> result = TestImplements::implementsMethod2(scriptContext, imp, strArg, objArg, es); |
| if (es.throwIfNeeded()) |
| return; |
| v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate())); |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| TestInterfaceV8Internal::implementsMethod2Method(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| V8TestInterface::implementsMethod3MethodCustom(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TestImplements::implementsMethod4(); |
| |
| return; |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| TestInterfaceV8Internal::implementsMethod4Method(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TestInterface* imp = V8TestInterface::toNative(args.Holder()); |
| TestPartialInterface::supplementalMethod1(imp); |
| |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| TestInterfaceV8Internal::supplementalMethod1Method(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| if (args.Length() < 2) { |
| throwNotEnoughArgumentsError(args.GetIsolate()); |
| return; |
| } |
| TestInterface* imp = V8TestInterface::toNative(args.Holder()); |
| ExceptionState es(args.GetIsolate()); |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); |
| V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0); |
| ScriptExecutionContext* scriptContext = getScriptExecutionContext(); |
| RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptContext, imp, strArg, objArg, es); |
| if (es.throwIfNeeded()) |
| return; |
| v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate())); |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| TestInterfaceV8Internal::supplementalMethod2Method(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| V8TestInterface::supplementalMethod3MethodCustom(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TestPartialInterface::supplementalMethod4(); |
| |
| return; |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| TestInterfaceV8Internal::supplementalMethod4Method(args); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| if (args.Length() < 1) { |
| throwNotEnoughArgumentsError(args.GetIsolate()); |
| return; |
| } |
| ExceptionState es(args.GetIsolate()); |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); |
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); |
| |
| ScriptExecutionContext* context = getScriptExecutionContext(); |
| RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, es); |
| v8::Handle<v8::Object> wrapper = args.Holder(); |
| if (es.throwIfNeeded()) |
| return; |
| |
| V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V8TestInterface::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| args.GetReturnValue().Set(wrapper); |
| } |
| |
| static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| return; |
| if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| return; |
| if (info.Holder()->HasRealNamedProperty(name)) |
| return; |
| |
| ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| TestInterface* collection = V8TestInterface::toNative(info.Holder()); |
| AtomicString propertyName = toWebCoreAtomicString(name); |
| bool element0Enabled = false; |
| RefPtr<Node> element0; |
| bool element1Enabled = false; |
| RefPtr<NodeList> element1; |
| collection->getItem(propertyName, element0Enabled, element0, element1Enabled, element1); |
| if (element0Enabled) { |
| v8SetReturnValue(info, toV8Fast(element0.release(), info, collection)); |
| return; |
| } |
| |
| if (element1Enabled) { |
| v8SetReturnValue(info, toV8Fast(element1.release(), info, collection)); |
| return; |
| } |
| |
| return; |
| } |
| |
| static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| TestInterfaceV8Internal::namedPropertyGetter(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| V8TestInterface::namedPropertySetterCustom(name, value, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) |
| { |
| ExceptionState es(info.GetIsolate()); |
| TestInterface* collection = V8TestInterface::toNative(info.Holder()); |
| Vector<String> names; |
| collection->namedPropertyEnumerator(names, es); |
| if (es.throwIfNeeded()) |
| return; |
| v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); |
| for (size_t i = 0; i < names.size(); ++i) |
| v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate())); |
| v8SetReturnValue(info, v8names); |
| } |
| |
| static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) |
| { |
| TestInterface* collection = V8TestInterface::toNative(info.Holder()); |
| AtomicString propertyName = toWebCoreAtomicString(name); |
| ExceptionState es(info.GetIsolate()); |
| bool result = collection->namedPropertyQuery(propertyName, es); |
| if (es.throwIfNeeded()) |
| return; |
| if (!result) |
| return; |
| v8SetReturnValueInt(info, v8::None); |
| } |
| |
| static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| TestInterfaceV8Internal::namedPropertyEnumerator(info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) |
| { |
| TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| TestInterfaceV8Internal::namedPropertyQuery(name, info); |
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| } |
| |
| } // namespace TestInterfaceV8Internal |
| |
| static const V8DOMConfiguration::BatchedAttribute V8TestInterfaceAttrs[] = { |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| // Attribute 'implementsStaticReadOnlyAttr' |
| {"implementsStaticReadOnlyAttr", TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| // Attribute 'implementsStaticAttr' |
| {"implementsStaticAttr", TestInterfaceV8Internal::implementsStaticAttrAttrGetterCallback, TestInterfaceV8Internal::implementsStaticAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| // Attribute 'implementsStr1' |
| {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| // Attribute 'implementsStr2' |
| {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttrGetterCallback, TestInterfaceV8Internal::implementsStr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| // Attribute 'implementsStr3' |
| {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttrGetterCallback, TestInterfaceV8Internal::implementsStr3AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| // Attribute 'implementsNode' |
| {"implementsNode", TestInterfaceV8Internal::implementsNodeAttrGetterCallback, TestInterfaceV8Internal::implementsNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| // Attribute 'supplementalStaticReadOnlyAttr' |
| {"supplementalStaticReadOnlyAttr", TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| // Attribute 'supplementalStaticAttr' |
| {"supplementalStaticAttr", TestInterfaceV8Internal::supplementalStaticAttrAttrGetterCallback, TestInterfaceV8Internal::supplementalStaticAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| // Attribute 'supplementalStr1' |
| {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| // Attribute 'supplementalStr2' |
| {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttrGetterCallback, TestInterfaceV8Internal::supplementalStr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| // Attribute 'supplementalStr3' |
| {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttrGetterCallback, TestInterfaceV8Internal::supplementalStr3AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| // Attribute 'supplementalNode' |
| {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttrGetterCallback, TestInterfaceV8Internal::supplementalNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| }; |
| |
| static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = { |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| {"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallback, 0, 0}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| {"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallback, 0, 0}, |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback, 0, 0}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCallback, 0, 0}, |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| }; |
| |
| static const V8DOMConfiguration::BatchedConstant V8TestInterfaceConsts[] = { |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| {"IMPLEMENTSCONSTANT1", 1}, |
| #endif |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| {"IMPLEMENTSCONSTANT2", 2}, |
| #endif |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| {"SUPPLEMENTALCONSTANT1", 1}, |
| #endif |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| {"SUPPLEMENTALCONSTANT2", 2}, |
| #endif |
| }; |
| |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TestInterfaceEnumIMPLEMENTSCONSTANT1IsWrongUseDoNotCheckConstants); |
| #endif |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants); |
| #endif |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TestInterfaceEnumSUPPLEMENTALCONSTANT1IsWrongUseDoNotCheckConstants); |
| #endif |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants); |
| #endif |
| |
| void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| { |
| TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
| if (!args.IsConstructCall()) { |
| throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); |
| return; |
| } |
| |
| if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| args.GetReturnValue().Set(args.Holder()); |
| return; |
| } |
| |
| TestInterfaceV8Internal::constructor(args); |
| } |
| |
| static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| { |
| desc->ReadOnlyPrototype(); |
| |
| v8::Local<v8::Signature> defaultSignature; |
| defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount, |
| V8TestInterfaceAttrs, WTF_ARRAY_LENGTH(V8TestInterfaceAttrs), |
| V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolate, currentWorldType); |
| UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
| desc->SetCallHandler(V8TestInterface::constructorCallback); |
| desc->SetLength(1); |
| v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); |
| v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); |
| UNUSED_PARAM(instance); // In some cases, it will not be used. |
| UNUSED_PARAM(proto); // In some cases, it will not be used. |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| if (RuntimeEnabledFeatures::condition23Enabled()) { |
| static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| // Attribute 'Node23' |
| {"Node23", TestInterfaceV8Internal::Node23AttrGetterCallback, TestInterfaceV8Internal::Node23AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType); |
| } |
| |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| if (RuntimeEnabledFeatures::condition13Enabled()) { |
| static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| // Attribute 'Node13' |
| {"Node13", TestInterfaceV8Internal::Node13AttrGetterCallback, TestInterfaceV8Internal::Node13AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType); |
| } |
| |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::namedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Internal::namedPropertyEnumeratorCallback); |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| |
| // Custom Signature 'implementsMethod2' |
| const int implementsMethod2Argc = 2; |
| v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) }; |
| v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(desc, implementsMethod2Argc, implementsMethod2Argv); |
| proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), implementsMethod2Signature, 2)); |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| |
| // Custom Signature 'supplementalMethod2' |
| const int supplementalMethod2Argc = 2; |
| v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) }; |
| v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(desc, supplementalMethod2Argc, supplementalMethod2Argv); |
| proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined(), supplementalMethod2Signature, 2)); |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestInterfaceConsts, WTF_ARRAY_LENGTH(V8TestInterfaceConsts), isolate); |
| |
| // Custom toString template |
| desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate()); |
| return desc; |
| } |
| |
| v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| { |
| V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info); |
| if (result != data->templateMap(currentWorldType).end()) |
| return result->value.newLocal(isolate); |
| |
| TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| v8::HandleScope handleScope(isolate); |
| v8::Handle<v8::FunctionTemplate> templ = |
| ConfigureV8TestInterfaceTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType); |
| data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::FunctionTemplate>(isolate, templ)); |
| return handleScope.Close(templ); |
| } |
| |
| bool V8TestInterface::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| { |
| return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType); |
| } |
| |
| bool V8TestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate* isolate) |
| { |
| return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) |
| || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWorld) |
| || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorld); |
| } |
| |
| void V8TestInterface::installPerContextProperties(v8::Handle<v8::Object> instance, TestInterface* impl, v8::Isolate* isolate) |
| { |
| v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetPrototype()); |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| if (ContextFeatures::condition24Enabled(impl->document())) { |
| static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| // Attribute 'Node24' |
| {"Node24", TestInterfaceV8Internal::Node24AttrGetterCallback, TestInterfaceV8Internal::Node24AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate); |
| } |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition22) || ENABLE(Condition23) |
| if (ContextFeatures::condition26Enabled(impl->document()) && RuntimeEnabledFeatures::condition25Enabled()) { |
| static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| // Attribute 'Node25' |
| {"Node25", TestInterfaceV8Internal::Node25AttrGetterCallback, TestInterfaceV8Internal::Node25AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate); |
| } |
| #endif // ENABLE(Condition22) || ENABLE(Condition23) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| if (ContextFeatures::condition14Enabled(impl->document())) { |
| static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| // Attribute 'Node14' |
| {"Node14", TestInterfaceV8Internal::Node14AttrGetterCallback, TestInterfaceV8Internal::Node14AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate); |
| } |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| |
| #if ENABLE(Condition11) || ENABLE(Condition12) |
| if (ContextFeatures::condition16Enabled(impl->document()) && RuntimeEnabledFeatures::condition15Enabled()) { |
| static const V8DOMConfiguration::BatchedAttribute attrData =\ |
| // Attribute 'Node15' |
| {"Node15", TestInterfaceV8Internal::Node15AttrGetterCallback, TestInterfaceV8Internal::Node15AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate); |
| } |
| #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| } |
| |
| ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> object) |
| { |
| return toNative(object); |
| } |
| |
| |
| v8::Handle<v8::Object> V8TestInterface::createWrapper(PassRefPtr<TestInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| { |
| ASSERT(impl.get()); |
| ASSERT(DOMDataStore::getWrapper<V8TestInterface>(impl.get(), isolate).IsEmpty()); |
| if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get()); |
| // Might be a XXXConstructor::info instead of an XXX::info. These will both have |
| // the same object de-ref functions, though, so use that as the basis of the check. |
| RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction); |
| } |
| |
| |
| v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, toInternalPointer(impl.get()), isolate); |
| if (UNLIKELY(wrapper.IsEmpty())) |
| return wrapper; |
| installPerContextProperties(wrapper, impl.get(), isolate); |
| V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl, &info, wrapper, isolate, WrapperConfiguration::Dependent); |
| return wrapper; |
| } |
| void V8TestInterface::derefObject(void* object) |
| { |
| fromInternalPointer(object)->deref(); |
| } |
| |
| } // namespace WebCore |
| |
| #endif // ENABLE(Condition1) || ENABLE(Condition2) |