2 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
34 #include "V8TestInterfaceNode.h"
36 #include "HTMLNames.h"
37 #include "RuntimeEnabledFeatures.h"
38 #include "V8TestInterfaceEmpty.h"
39 #include "bindings/v8/ExceptionState.h"
40 #include "bindings/v8/V8AbstractEventListener.h"
41 #include "bindings/v8/V8DOMConfiguration.h"
42 #include "bindings/v8/V8EventListenerList.h"
43 #include "bindings/v8/V8ObjectConstructor.h"
44 #include "core/dom/ContextFeatures.h"
45 #include "core/dom/Document.h"
46 #include "core/dom/custom/CustomElementCallbackDispatcher.h"
47 #include "platform/TraceEvent.h"
48 #include "wtf/GetPtr.h"
49 #include "wtf/RefPtr.h"
53 static void initializeScriptWrappableForInterface(TestInterfaceNode* object)
55 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
56 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceNode::wrapperTypeInfo);
61 } // namespace WebCore
63 // In ScriptWrappable::init, the use of a local function declaration has an issue on Windows:
64 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
65 // in the global namespace.
66 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
67 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceNode* object)
69 WebCore::initializeScriptWrappableForInterface(object);
73 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::derefObject, 0, V8TestInterfaceNode::toEventTarget, 0, V8TestInterfaceNode::installPerContextEnabledMethods, &V8Node::wrapperTypeInfo, WrapperTypeObjectPrototype, false };
75 namespace TestInterfaceNodeV8Internal {
77 template <typename T> void V8_USE(T) { }
79 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
81 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
82 v8SetReturnValueString(info, imp->stringAttribute(), info.GetIsolate());
85 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
87 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
88 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info);
89 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
92 static void stringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
94 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
96 imp->setStringAttribute(cppValue);
99 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
102 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(jsValue, info);
103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
106 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
108 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
109 v8SetReturnValueFast(info, imp->readonlyTestInterfaceEmptyAttribute(), imp);
112 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
115 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
119 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
121 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
122 EventListener* jsValue = imp->eventHandlerAttribute();
123 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
126 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
129 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info);
130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
133 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
135 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
136 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate));
139 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
142 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, info);
143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
148 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
149 v8SetReturnValueFast(info, imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute(), imp);
152 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
155 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
159 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
161 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
162 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute());
165 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
168 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
172 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
174 Element* imp = V8Element::toNative(info.Holder());
175 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectstringattributeAttr), info.GetIsolate());
178 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
181 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info);
182 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
185 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
187 Element* imp = V8Element::toNative(info.Holder());
188 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
189 imp->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
192 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
194 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
195 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
196 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(jsValue, info);
197 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
200 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
202 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
203 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflecturlstringattributeAttr), info.GetIsolate());
206 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
209 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info);
210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
213 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
215 Element* imp = V8Element::toNative(info.Holder());
216 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
217 imp->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
220 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
222 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
223 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
224 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(jsValue, info);
225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
228 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
230 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
231 v8SetReturnValueFast(info, imp->testInterfaceEmptyMethod(), imp);
234 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
237 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info);
238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
241 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
243 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
244 v8SetReturnValueFast(info, imp->perWorldBindingsTestInterfaceEmptyMethod(), imp);
247 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
250 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod(info);
251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
254 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
256 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
257 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsTestInterfaceEmptyMethod());
260 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
263 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(info);
264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
267 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
269 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
270 if (UNLIKELY(info.Length() <= 0)) {
271 v8SetReturnValueFast(info, imp->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(), imp);
274 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue());
275 v8SetReturnValueFast(info, imp->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument), imp);
278 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
281 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(info);
282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
285 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
287 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder());
288 if (UNLIKELY(info.Length() <= 0)) {
289 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg());
292 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue());
293 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument));
296 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
299 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForMainWorld(info);
300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
303 } // namespace TestInterfaceNodeV8Internal
305 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNodeAttributes[] = {
306 {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
307 {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
308 {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
309 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
310 {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
311 {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
314 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[] = {
315 {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0},
316 {"perWorldBindingsTestInterfaceEmptyMethod", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld, 0},
317 {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld, 0},
320 static void configureV8TestInterfaceNodeTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
322 functionTemplate->ReadOnlyPrototype();
324 v8::Local<v8::Signature> defaultSignature;
325 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfaceNode", V8Node::domTemplate(isolate, currentWorldType), V8TestInterfaceNode::internalFieldCount,
326 V8TestInterfaceNodeAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAttributes),
328 V8TestInterfaceNodeMethods, WTF_ARRAY_LENGTH(V8TestInterfaceNodeMethods),
329 isolate, currentWorldType);
330 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTemplate->InstanceTemplate();
331 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTemplate->PrototypeTemplate();
333 // Custom toString template
334 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate());
337 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNode::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
339 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
340 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
341 if (result != data->templateMap(currentWorldType).end())
342 return result->value.newLocal(isolate);
344 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
345 v8::EscapableHandleScope handleScope(isolate);
346 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
347 configureV8TestInterfaceNodeTemplate(templ, isolate, currentWorldType);
348 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
349 return handleScope.Escape(templ);
352 bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
354 return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeInfo, jsValue)
355 || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTypeInfo, jsValue);
358 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object)
360 return toNative(object);
363 v8::Handle<v8::Object> V8TestInterfaceNode::createWrapper(PassRefPtr<TestInterfaceNode> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
366 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNode>(impl.get(), isolate));
367 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
368 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
369 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
370 // the same object de-ref functions, though, so use that as the basis of the check.
371 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
374 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
375 if (UNLIKELY(wrapper.IsEmpty()))
378 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
379 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNode>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
383 void V8TestInterfaceNode::derefObject(void* object)
385 fromInternalPointer(object)->deref();
389 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
391 return toV8(impl, creationContext, isolate);
394 } // namespace WebCore