OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #ifndef V8TestInterfaceConstructor2_h | 7 #ifndef V8TestInterfaceConstructor4_h |
8 #define V8TestInterfaceConstructor2_h | 8 #define V8TestInterfaceConstructor4_h |
9 | 9 |
10 #include "bindings/tests/idls/TestInterfaceConstructor2.h" | 10 #include "bindings/tests/idls/TestInterfaceConstructor4.h" |
11 #include "bindings/v8/V8Binding.h" | 11 #include "bindings/v8/V8Binding.h" |
12 #include "bindings/v8/V8DOMWrapper.h" | 12 #include "bindings/v8/V8DOMWrapper.h" |
13 #include "bindings/v8/WrapperTypeInfo.h" | 13 #include "bindings/v8/WrapperTypeInfo.h" |
14 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
15 | 15 |
16 namespace WebCore { | 16 namespace WebCore { |
17 | 17 |
18 class V8TestInterfaceConstructor2 { | 18 class V8TestInterfaceConstructor4 { |
19 public: | 19 public: |
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); | 21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); |
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | 22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
23 static TestInterfaceConstructor2* toNative(v8::Handle<v8::Object> object) | 23 static TestInterfaceConstructor4* toNative(v8::Handle<v8::Object> object) |
24 { | 24 { |
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
26 } | 26 } |
27 static TestInterfaceConstructor2* toNativeWithTypeCheck(v8::Isolate*, v8::Ha
ndle<v8::Value>); | 27 static TestInterfaceConstructor4* toNativeWithTypeCheck(v8::Isolate*, v8::Ha
ndle<v8::Value>); |
28 static const WrapperTypeInfo wrapperTypeInfo; | 28 static const WrapperTypeInfo wrapperTypeInfo; |
29 static void derefObject(void*); | 29 static void derefObject(void*); |
30 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 30 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
31 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 31 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
32 static inline void* toInternalPointer(TestInterfaceConstructor2* impl) | 32 static inline void* toInternalPointer(TestInterfaceConstructor4* impl) |
33 { | 33 { |
34 return impl; | 34 return impl; |
35 } | 35 } |
36 | 36 |
37 static inline TestInterfaceConstructor2* fromInternalPointer(void* object) | 37 static inline TestInterfaceConstructor4* fromInternalPointer(void* object) |
38 { | 38 { |
39 return static_cast<TestInterfaceConstructor2*>(object); | 39 return static_cast<TestInterfaceConstructor4*>(object); |
40 } | 40 } |
41 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceConstructor2*, v8::Isolate*) { } | 41 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceConstructor4*, v8::Isolate*) { } |
42 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 42 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
43 | 43 |
44 private: | 44 private: |
45 friend v8::Handle<v8::Object> wrap(TestInterfaceConstructor2*, v8::Handle<v8
::Object> creationContext, v8::Isolate*); | 45 friend v8::Handle<v8::Object> wrap(TestInterfaceConstructor4*, v8::Handle<v8
::Object> creationContext, v8::Isolate*); |
46 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceConstruc
tor2>, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 46 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceConstruc
tor4>, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
47 }; | 47 }; |
48 | 48 |
49 v8::Handle<v8::Object> wrap(TestInterfaceConstructor2* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate*); | 49 v8::Handle<v8::Object> wrap(TestInterfaceConstructor4* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate*); |
50 | 50 |
51 inline v8::Handle<v8::Value> toV8(TestInterfaceConstructor2* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 51 inline v8::Handle<v8::Value> toV8(TestInterfaceConstructor4* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
52 { | 52 { |
53 if (UNLIKELY(!impl)) | 53 if (UNLIKELY(!impl)) |
54 return v8::Null(isolate); | 54 return v8::Null(isolate); |
55 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceCons
tructor2>(impl, isolate); | 55 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceCons
tructor4>(impl, isolate); |
56 if (!wrapper.IsEmpty()) | 56 if (!wrapper.IsEmpty()) |
57 return wrapper; | 57 return wrapper; |
58 return wrap(impl, creationContext, isolate); | 58 return wrap(impl, creationContext, isolate); |
59 } | 59 } |
60 | 60 |
61 template<typename CallbackInfo> | 61 template<typename CallbackInfo> |
62 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceCons
tructor2* impl) | 62 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceCons
tructor4* impl) |
63 { | 63 { |
64 if (UNLIKELY(!impl)) { | 64 if (UNLIKELY(!impl)) { |
65 v8SetReturnValueNull(callbackInfo); | 65 v8SetReturnValueNull(callbackInfo); |
66 return; | 66 return; |
67 } | 67 } |
68 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceConstructor2>(cal
lbackInfo.GetReturnValue(), impl)) | 68 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceConstructor4>(cal
lbackInfo.GetReturnValue(), impl)) |
69 return; | 69 return; |
70 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 70 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
71 v8SetReturnValue(callbackInfo, wrapper); | 71 v8SetReturnValue(callbackInfo, wrapper); |
72 } | 72 } |
73 | 73 |
74 template<typename CallbackInfo> | 74 template<typename CallbackInfo> |
75 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfaceConstructor2* impl) | 75 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfaceConstructor4* impl) |
76 { | 76 { |
77 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld()); | 77 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld()); |
78 if (UNLIKELY(!impl)) { | 78 if (UNLIKELY(!impl)) { |
79 v8SetReturnValueNull(callbackInfo); | 79 v8SetReturnValueNull(callbackInfo); |
80 return; | 80 return; |
81 } | 81 } |
82 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceConst
ructor2>(callbackInfo.GetReturnValue(), impl)) | 82 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceConst
ructor4>(callbackInfo.GetReturnValue(), impl)) |
83 return; | 83 return; |
84 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); | 84 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); |
85 v8SetReturnValue(callbackInfo, wrapper); | 85 v8SetReturnValue(callbackInfo, wrapper); |
86 } | 86 } |
87 | 87 |
88 template<class CallbackInfo, class Wrappable> | 88 template<class CallbackInfo, class Wrappable> |
89 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
Constructor2* impl, Wrappable* wrappable) | 89 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
Constructor4* impl, Wrappable* wrappable) |
90 { | 90 { |
91 if (UNLIKELY(!impl)) { | 91 if (UNLIKELY(!impl)) { |
92 v8SetReturnValueNull(callbackInfo); | 92 v8SetReturnValueNull(callbackInfo); |
93 return; | 93 return; |
94 } | 94 } |
95 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceConstructor2>
(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) | 95 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceConstructor4>
(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) |
96 return; | 96 return; |
97 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 97 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
98 v8SetReturnValue(callbackInfo, wrapper); | 98 v8SetReturnValue(callbackInfo, wrapper); |
99 } | 99 } |
100 | 100 |
101 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceConstructor2> impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 101 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceConstructor4> impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
102 { | 102 { |
103 return toV8(impl.get(), creationContext, isolate); | 103 return toV8(impl.get(), creationContext, isolate); |
104 } | 104 } |
105 | 105 |
106 template<class CallbackInfo> | 106 template<class CallbackInfo> |
107 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfaceConstructor2> impl) | 107 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfaceConstructor4> impl) |
108 { | 108 { |
109 v8SetReturnValue(callbackInfo, impl.get()); | 109 v8SetReturnValue(callbackInfo, impl.get()); |
110 } | 110 } |
111 | 111 |
112 template<class CallbackInfo> | 112 template<class CallbackInfo> |
113 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfaceConstructor2> impl) | 113 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfaceConstructor4> impl) |
114 { | 114 { |
115 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 115 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
116 } | 116 } |
117 | 117 |
118 template<class CallbackInfo, class Wrappable> | 118 template<class CallbackInfo, class Wrappable> |
119 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceConstructor2> impl, Wrappable* wrappable) | 119 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceConstructor4> impl, Wrappable* wrappable) |
120 { | 120 { |
121 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 121 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
122 } | 122 } |
123 | 123 |
124 } | 124 } |
125 #endif // V8TestInterfaceConstructor2_h | 125 #endif // V8TestInterfaceConstructor4_h |
OLD | NEW |