Home | History | Annotate | Download | only in core
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
      6 
      7 #include "config.h"
      8 #include "V8TestInterfaceNode.h"
      9 
     10 #include "bindings/core/v8/ExceptionState.h"
     11 #include "bindings/core/v8/V8AbstractEventListener.h"
     12 #include "bindings/core/v8/V8DOMConfiguration.h"
     13 #include "bindings/core/v8/V8EventListenerList.h"
     14 #include "bindings/core/v8/V8HiddenValue.h"
     15 #include "bindings/core/v8/V8ObjectConstructor.h"
     16 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
     17 #include "core/HTMLNames.h"
     18 #include "core/dom/ContextFeatures.h"
     19 #include "core/dom/Document.h"
     20 #include "core/dom/custom/CustomElementProcessingStack.h"
     21 #include "platform/RuntimeEnabledFeatures.h"
     22 #include "platform/TraceEvent.h"
     23 #include "wtf/GetPtr.h"
     24 #include "wtf/RefPtr.h"
     25 
     26 namespace blink {
     27 
     28 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::refObject, V8TestInterfaceNode::derefObject, V8TestInterfaceNode::createPersistentHandle, 0, V8TestInterfaceNode::toEventTarget, 0, V8TestInterfaceNode::installConditionallyEnabledMethods, V8TestInterfaceNode::installConditionallyEnabledProperties, &V8Node::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::Dependent, WrapperTypeInfo::WillBeGarbageCollectedObject };
     29 
     30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfaceNode.h.
     31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
     32 // bindings/core/v8/ScriptWrappable.h.
     33 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNode::wrapperTypeInfo;
     34 
     35 namespace TestInterfaceNodeV8Internal {
     36 
     37 template <typename T> void V8_USE(T) { }
     38 
     39 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
     40 {
     41     v8::Handle<v8::Object> holder = info.Holder();
     42     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
     43     v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
     44 }
     45 
     46 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
     47 {
     48     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
     49     TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info);
     50     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
     51 }
     52 
     53 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
     54 {
     55     v8::Handle<v8::Object> holder = info.Holder();
     56     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
     57     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
     58     impl->setStringAttribute(cppValue);
     59 }
     60 
     61 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
     62 {
     63     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
     64     TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info);
     65     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
     66 }
     67 
     68 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
     69 {
     70     v8::Handle<v8::Object> holder = info.Holder();
     71     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
     72     v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttribute()), impl);
     73 }
     74 
     75 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
     76 {
     77     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
     78     TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
     79     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
     80 }
     81 
     82 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
     83 {
     84     v8::Handle<v8::Object> holder = info.Holder();
     85     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
     86     EventListener* cppValue(impl->eventHandlerAttribute());
     87     v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
     88 }
     89 
     90 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
     91 {
     92     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
     93     TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info);
     94     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
     95 }
     96 
     97 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
     98 {
     99     v8::Handle<v8::Object> holder = info.Holder();
    100     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
    101     impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate));
    102 }
    103 
    104 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
    105 {
    106     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
    107     TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info);
    108     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    109 }
    110 
    111 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
    112 {
    113     v8::Handle<v8::Object> holder = info.Holder();
    114     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
    115     v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInterfaceEmptyAttribute()), impl);
    116 }
    117 
    118 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
    119 {
    120     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
    121     TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
    122     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    123 }
    124 
    125 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
    126 {
    127     v8::Handle<v8::Object> holder = info.Holder();
    128     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
    129     v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInterfaceEmptyAttribute()));
    130 }
    131 
    132 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
    133 {
    134     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
    135     TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
    136     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    137 }
    138 
    139 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
    140 {
    141     v8::Handle<v8::Object> holder = info.Holder();
    142     Element* impl = V8Element::toImpl(holder);
    143     v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstringattributeAttr), info.GetIsolate());
    144 }
    145 
    146 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
    147 {
    148     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
    149     TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info);
    150     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    151 }
    152 
    153 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
    154 {
    155     v8::Handle<v8::Object> holder = info.Holder();
    156     Element* impl = V8Element::toImpl(holder);
    157     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
    158     impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
    159 }
    160 
    161 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
    162 {
    163     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
    164     CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
    165     TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value, info);
    166     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    167 }
    168 
    169 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
    170 {
    171     v8::Handle<v8::Object> holder = info.Holder();
    172     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
    173     v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstringattributeAttr), info.GetIsolate());
    174 }
    175 
    176 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
    177 {
    178     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
    179     TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info);
    180     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    181 }
    182 
    183 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
    184 {
    185     v8::Handle<v8::Object> holder = info.Holder();
    186     Element* impl = V8Element::toImpl(holder);
    187     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
    188     impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
    189 }
    190 
    191 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
    192 {
    193     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
    194     CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
    195     TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Value, info);
    196     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    197 }
    198 
    199 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
    200 {
    201     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
    202     v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), impl);
    203 }
    204 
    205 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
    206 {
    207     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
    208     TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info);
    209     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    210 }
    211 
    212 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
    213 {
    214     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
    215     v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethod()), impl);
    216 }
    217 
    218 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
    219 {
    220     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
    221     TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod(info);
    222     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    223 }
    224 
    225 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
    226 {
    227     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
    228     v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethod()));
    229 }
    230 
    231 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
    232 {
    233     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
    234     TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(info);
    235     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    236 }
    237 
    238 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
    239 {
    240     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
    241     bool optionalBooleanArgument;
    242     {
    243         if (UNLIKELY(info.Length() <= 0)) {
    244             v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg()), impl);
    245             return;
    246         }
    247         optionalBooleanArgument = info[0]->BooleanValue();
    248     }
    249     v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument)), impl);
    250 }
    251 
    252 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
    253 {
    254     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
    255     TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(info);
    256     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    257 }
    258 
    259 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
    260 {
    261     TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
    262     bool optionalBooleanArgument;
    263     {
    264         if (UNLIKELY(info.Length() <= 0)) {
    265             v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg()));
    266             return;
    267         }
    268         optionalBooleanArgument = info[0]->BooleanValue();
    269     }
    270     v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument)));
    271 }
    272 
    273 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
    274 {
    275     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
    276     TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForMainWorld(info);
    277     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
    278 }
    279 
    280 } // namespace TestInterfaceNodeV8Internal
    281 
    282 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNodeAttributes[] = {
    283     {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
    284     {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
    285     {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
    286     {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
    287     {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
    288     {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
    289 };
    290 
    291 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[] = {
    292     {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
    293     {"perWorldBindingsTestInterfaceEmptyMethod", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
    294     {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
    295 };
    296 
    297 static void installV8TestInterfaceNodeTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
    298 {
    299     functionTemplate->ReadOnlyPrototype();
    300 
    301     v8::Local<v8::Signature> defaultSignature;
    302     defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfaceNode", V8Node::domTemplate(isolate), V8TestInterfaceNode::internalFieldCount,
    303         V8TestInterfaceNodeAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAttributes),
    304         0, 0,
    305         V8TestInterfaceNodeMethods, WTF_ARRAY_LENGTH(V8TestInterfaceNodeMethods),
    306         isolate);
    307     v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTemplate->InstanceTemplate();
    308     v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTemplate->PrototypeTemplate();
    309 
    310     // Custom toString template
    311     functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
    312 }
    313 
    314 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNode::domTemplate(v8::Isolate* isolate)
    315 {
    316     return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceNodeTemplate);
    317 }
    318 
    319 bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
    320 {
    321     return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
    322 }
    323 
    324 v8::Handle<v8::Object> V8TestInterfaceNode::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
    325 {
    326     return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
    327 }
    328 
    329 TestInterfaceNode* V8TestInterfaceNode::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
    330 {
    331     return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle<v8::Object>::Cast(value))->toImpl<TestInterfaceNode>() : 0;
    332 }
    333 
    334 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object)
    335 {
    336     return toImpl(object);
    337 }
    338 
    339 
    340 void V8TestInterfaceNode::refObject(ScriptWrappableBase* internalPointer)
    341 {
    342 #if !ENABLE(OILPAN)
    343     internalPointer->toImpl<TestInterfaceNode>()->ref();
    344 #endif
    345 }
    346 
    347 void V8TestInterfaceNode::derefObject(ScriptWrappableBase* internalPointer)
    348 {
    349 #if !ENABLE(OILPAN)
    350     internalPointer->toImpl<TestInterfaceNode>()->deref();
    351 #endif
    352 }
    353 
    354 WrapperPersistentNode* V8TestInterfaceNode::createPersistentHandle(ScriptWrappableBase* internalPointer)
    355 {
    356 #if ENABLE(OILPAN)
    357     return WrapperPersistent<TestInterfaceNode>::create(internalPointer->toImpl<TestInterfaceNode>());
    358 #else
    359     ASSERT_NOT_REACHED();
    360     return 0;
    361 #endif
    362 }
    363 
    364 template<>
    365 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
    366 {
    367     return toV8(impl, creationContext, isolate);
    368 }
    369 
    370 } // namespace blink
    371