Upstream version 10.38.222.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / results / V8TestTypedefs.cpp
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 "V8TestTypedefs.h"
9
10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/V8DOMConfiguration.h"
12 #include "bindings/core/v8/V8HiddenValue.h"
13 #include "bindings/core/v8/V8ObjectConstructor.h"
14 #include "bindings/tests/v8/V8TestCallbackInterface.h"
15 #include "bindings/tests/v8/V8TestInterface.h"
16 #include "bindings/tests/v8/V8TestInterfaceEmpty.h"
17 #include "core/dom/ContextFeatures.h"
18 #include "core/dom/Document.h"
19 #include "core/frame/LocalDOMWindow.h"
20 #include "platform/RuntimeEnabledFeatures.h"
21 #include "platform/TraceEvent.h"
22 #include "wtf/GetPtr.h"
23 #include "wtf/RefPtr.h"
24
25 namespace blink {
26
27 static void initializeScriptWrappableForInterface(TestTypedefs* object)
28 {
29     if (ScriptWrappable::wrapperCanBeStoredInObject(object))
30         ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestTypedefs::wrapperTypeInfo);
31     else
32         ASSERT_NOT_REACHED();
33 }
34
35 } // namespace blink
36
37 void webCoreInitializeScriptWrappableForInterface(blink::TestTypedefs* object)
38 {
39     blink::initializeScriptWrappableForInterface(object);
40 }
41
42 namespace blink {
43 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestTypedefs::domTemplate, V8TestTypedefs::derefObject, 0, 0, 0, V8TestTypedefs::installConditionallyEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject };
44
45 namespace TestTypedefsV8Internal {
46
47 template <typename T> void V8_USE(T) { }
48
49 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
50 {
51     v8::Handle<v8::Object> holder = info.Holder();
52     TestTypedefs* impl = V8TestTypedefs::toNative(holder);
53     v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute()));
54 }
55
56 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
57 {
58     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
59     TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info);
60     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
61 }
62
63 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
64 {
65     v8::Handle<v8::Object> holder = info.Holder();
66     ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttribute", "TestTypedefs", holder, info.GetIsolate());
67     TestTypedefs* impl = V8TestTypedefs::toNative(holder);
68     TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value, exceptionState), exceptionState);
69     impl->setULongLongAttribute(cppValue);
70 }
71
72 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
73 {
74     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
75     TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info);
76     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
77 }
78
79 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
80 {
81     v8::Handle<v8::Value> data = info.Data();
82     ASSERT(data->IsExternal());
83     V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
84     if (!perContextData)
85         return;
86     v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
87 }
88
89 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
90 {
91     if (info.This()->IsObject())
92         v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
93 }
94
95 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
96 {
97     TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, info);
98 }
99
100 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
101 {
102     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
103     Vector<int> arrayOfLongsArg;
104     {
105         v8::TryCatch block;
106         V8RethrowTryCatchScope rethrow(block);
107         if (UNLIKELY(info.Length() <= 0)) {
108             impl->voidMethodArrayOfLongsArg();
109             return;
110         }
111         TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
112     }
113     impl->voidMethodArrayOfLongsArg(arrayOfLongsArg);
114 }
115
116 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
117 {
118     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
119     TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info);
120     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
121 }
122
123 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
124 {
125     if (UNLIKELY(info.Length() < 2)) {
126         V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("voidMethodFloatArgStringArg", "TestTypedefs", 2, info.Length(), info.GetIsolate()), info.GetIsolate());
127         return;
128     }
129     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
130     float floatArg;
131     V8StringResource<> stringArg;
132     {
133         v8::TryCatch block;
134         V8RethrowTryCatchScope rethrow(block);
135         TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue()));
136         TOSTRING_VOID_INTERNAL(stringArg, info[1]);
137     }
138     impl->voidMethodFloatArgStringArg(floatArg, stringArg);
139 }
140
141 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
142 {
143     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
144     TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info);
145     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
146 }
147
148 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
149 {
150     if (UNLIKELY(info.Length() < 1)) {
151         V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
152         return;
153     }
154     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
155     OwnPtr<TestCallbackInterface> testCallbackInterfaceTypeArg;
156     {
157         if (info.Length() <= 0 || !info[0]->IsFunction()) {
158             V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
159             return;
160         }
161         testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
162     }
163     impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg.release());
164 }
165
166 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
167 {
168     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
169     TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info);
170     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
171 }
172
173 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
174 {
175     if (UNLIKELY(info.Length() < 1)) {
176         V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("uLongLongMethodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
177         return;
178     }
179     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
180     Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg;
181     {
182         v8::TryCatch block;
183         V8RethrowTryCatchScope rethrow(block);
184         TONATIVE_VOID_INTERNAL(testInterfaceEmptyTypeSequenceArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
185     }
186     v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfaceEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg)));
187 }
188
189 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
190 {
191     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
192     TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(info);
193     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
194 }
195
196 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
197 {
198     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
199     RefPtr<TestInterfaceImplementation> result0;
200     RefPtr<TestInterfaceEmpty> result1;
201     impl->testInterfaceOrTestInterfaceEmptyMethod(result0, result1);
202     if (result0) {
203         v8SetReturnValue(info, result0.release());
204         return;
205     }
206     if (result1) {
207         v8SetReturnValue(info, result1.release());
208         return;
209     }
210     v8SetReturnValueNull(info);
211 }
212
213 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
214 {
215     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
216     TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info);
217     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
218 }
219
220 static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
221 {
222     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
223     String result0;
224     Nullable<double> result1;
225     impl->domStringOrDoubleMethod(result0, result1);
226     if (!result0.isNull()) {
227         v8SetReturnValueString(info, result0, info.GetIsolate());
228         return;
229     }
230     if (result1) {
231         v8SetReturnValue(info, result1.get());
232         return;
233     }
234     v8SetReturnValueNull(info);
235 }
236
237 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
238 {
239     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
240     TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info);
241     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
242 }
243
244 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
245 {
246     if (UNLIKELY(info.Length() < 1)) {
247         V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("arrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
248         return;
249     }
250     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
251     Vector<String> arrayOfStringsArg;
252     {
253         v8::TryCatch block;
254         V8RethrowTryCatchScope rethrow(block);
255         TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
256     }
257     v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(arrayOfStringsArg), info.Holder(), info.GetIsolate()));
258 }
259
260 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
261 {
262     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
263     TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info);
264     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
265 }
266
267 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
268 {
269     if (UNLIKELY(info.Length() < 1)) {
270         V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("stringArrayMethodStringArrayArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
271         return;
272     }
273     TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
274     Vector<String> stringArrayArg;
275     {
276         v8::TryCatch block;
277         V8RethrowTryCatchScope rethrow(block);
278         TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
279     }
280     v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringArrayArg), info.Holder(), info.GetIsolate()));
281 }
282
283 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
284 {
285     TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
286     TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info);
287     TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
288 }
289
290 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
291 {
292     if (UNLIKELY(info.Length() < 1)) {
293         V8ThrowException::throwException(createMinimumArityTypeErrorForConstructor("TestTypedefs", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
294         return;
295     }
296     V8StringResource<> stringArg;
297     {
298         TOSTRING_VOID_INTERNAL(stringArg, info[0]);
299     }
300     RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg);
301     v8::Handle<v8::Object> wrapper = info.Holder();
302     V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Independent);
303     v8SetReturnValue(info, wrapper);
304 }
305
306 } // namespace TestTypedefsV8Internal
307
308 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes[] = {
309     {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGetterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
310     {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThisCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
311 };
312
313 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = {
314     {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
315     {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgStringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
316     {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
317     {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
318     {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
319     {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
320     {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
321     {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
322 };
323
324 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
325 {
326     TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor");
327     if (!info.IsConstructCall()) {
328         V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("TestTypedefs"), info.GetIsolate());
329         return;
330     }
331
332     if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExistingObject) {
333         v8SetReturnValue(info, info.Holder());
334         return;
335     }
336
337     TestTypedefsV8Internal::constructor(info);
338 }
339
340 static void installV8TestTypedefsTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
341 {
342     functionTemplate->ReadOnlyPrototype();
343
344     v8::Local<v8::Signature> defaultSignature;
345     defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestTypedefs", v8::Local<v8::FunctionTemplate>(), V8TestTypedefs::internalFieldCount,
346         V8TestTypedefsAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsAttributes),
347         0, 0,
348         V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods),
349         isolate);
350     functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback);
351     functionTemplate->SetLength(1);
352     v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTemplate->InstanceTemplate();
353     v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTemplate->PrototypeTemplate();
354
355     // Custom toString template
356     functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
357 }
358
359 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::domTemplate(v8::Isolate* isolate)
360 {
361     return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestTypedefsTemplate);
362 }
363
364 bool V8TestTypedefs::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
365 {
366     return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
367 }
368
369 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
370 {
371     return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
372 }
373
374 TestTypedefs* V8TestTypedefs::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
375 {
376     return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPointer(v8::Handle<v8::Object>::Cast(value))) : 0;
377 }
378
379 v8::Handle<v8::Object> wrap(TestTypedefs* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
380 {
381     ASSERT(impl);
382     ASSERT(!DOMDataStore::containsWrapper<V8TestTypedefs>(impl, isolate));
383     return V8TestTypedefs::createWrapper(impl, creationContext, isolate);
384 }
385
386 v8::Handle<v8::Object> V8TestTypedefs::createWrapper(PassRefPtr<TestTypedefs> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
387 {
388     ASSERT(impl);
389     ASSERT(!DOMDataStore::containsWrapper<V8TestTypedefs>(impl.get(), isolate));
390     if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
391         const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get())->typeInfo();
392         // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
393         // the same object de-ref functions, though, so use that as the basis of the check.
394         RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
395     }
396
397     v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
398     if (UNLIKELY(wrapper.IsEmpty()))
399         return wrapper;
400
401     installConditionallyEnabledProperties(wrapper, isolate);
402     V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
403     return wrapper;
404 }
405
406 void V8TestTypedefs::derefObject(ScriptWrappableBase* internalPointer)
407 {
408     fromInternalPointer(internalPointer)->deref();
409 }
410
411 template<>
412 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
413 {
414     return toV8(impl, creationContext, isolate);
415 }
416
417 } // namespace blink