OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
32 | 32 |
33 #ifndef V8TestDoNotCheckConstantsInterface_h | 33 #ifndef V8TestInterfaceDoNotCheckConstants_h |
34 #define V8TestDoNotCheckConstantsInterface_h | 34 #define V8TestInterfaceDoNotCheckConstants_h |
35 | 35 |
36 #include "bindings/tests/idls/TestDoNotCheckConstantsInterface.h" | 36 #include "bindings/tests/idls/TestInterfaceDoNotCheckConstants.h" |
37 #include "bindings/v8/V8Binding.h" | 37 #include "bindings/v8/V8Binding.h" |
38 #include "bindings/v8/V8DOMWrapper.h" | 38 #include "bindings/v8/V8DOMWrapper.h" |
39 #include "bindings/v8/WrapperTypeInfo.h" | 39 #include "bindings/v8/WrapperTypeInfo.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 class V8TestDoNotCheckConstantsInterface { | 43 class V8TestInterfaceDoNotCheckConstants { |
44 public: | 44 public: |
45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); | 45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); |
46 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); | 46 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); |
47 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); | 47 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); |
48 static TestDoNotCheckConstantsInterface* toNative(v8::Handle<v8::Object> obj
ect) | 48 static TestInterfaceDoNotCheckConstants* toNative(v8::Handle<v8::Object> obj
ect) |
49 { | 49 { |
50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
51 } | 51 } |
52 static void derefObject(void*); | 52 static void derefObject(void*); |
53 static const WrapperTypeInfo wrapperTypeInfo; | 53 static const WrapperTypeInfo wrapperTypeInfo; |
54 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 54 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
55 static inline void* toInternalPointer(TestDoNotCheckConstantsInterface* impl
) | 55 static inline void* toInternalPointer(TestInterfaceDoNotCheckConstants* impl
) |
56 { | 56 { |
57 return impl; | 57 return impl; |
58 } | 58 } |
59 | 59 |
60 static inline TestDoNotCheckConstantsInterface* fromInternalPointer(void* ob
ject) | 60 static inline TestInterfaceDoNotCheckConstants* fromInternalPointer(void* ob
ject) |
61 { | 61 { |
62 return static_cast<TestDoNotCheckConstantsInterface*>(object); | 62 return static_cast<TestInterfaceDoNotCheckConstants*>(object); |
63 } | 63 } |
64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestD
oNotCheckConstantsInterface*, v8::Isolate*) { } | 64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceDoNotCheckConstants*, v8::Isolate*) { } |
65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
66 | 66 |
67 private: | 67 private: |
68 friend v8::Handle<v8::Object> wrap(TestDoNotCheckConstantsInterface*, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate*); | 68 friend v8::Handle<v8::Object> wrap(TestInterfaceDoNotCheckConstants*, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate*); |
69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestDoNotCheckConstan
tsInterface>, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceDoNotChe
ckConstants>, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
70 }; | 70 }; |
71 | 71 |
72 template<> | 72 template<> |
73 class WrapperTypeTraits<TestDoNotCheckConstantsInterface > { | 73 class WrapperTypeTraits<TestInterfaceDoNotCheckConstants > { |
74 public: | 74 public: |
75 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestDoNotCheckCo
nstantsInterface::wrapperTypeInfo; } | 75 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfaceDoN
otCheckConstants::wrapperTypeInfo; } |
76 }; | 76 }; |
77 | 77 |
78 inline v8::Handle<v8::Object> wrap(TestDoNotCheckConstantsInterface* impl, v8::H
andle<v8::Object> creationContext, v8::Isolate* isolate) | 78 inline v8::Handle<v8::Object> wrap(TestInterfaceDoNotCheckConstants* impl, v8::H
andle<v8::Object> creationContext, v8::Isolate* isolate) |
79 { | 79 { |
80 ASSERT(impl); | 80 ASSERT(impl); |
81 ASSERT(!DOMDataStore::containsWrapper<V8TestDoNotCheckConstantsInterface>(im
pl, isolate)); | 81 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceDoNotCheckConstants>(im
pl, isolate)); |
82 return V8TestDoNotCheckConstantsInterface::createWrapper(impl, creationConte
xt, isolate); | 82 return V8TestInterfaceDoNotCheckConstants::createWrapper(impl, creationConte
xt, isolate); |
83 } | 83 } |
84 | 84 |
85 inline v8::Handle<v8::Value> toV8(TestDoNotCheckConstantsInterface* impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) | 85 inline v8::Handle<v8::Value> toV8(TestInterfaceDoNotCheckConstants* impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) |
86 { | 86 { |
87 if (UNLIKELY(!impl)) | 87 if (UNLIKELY(!impl)) |
88 return v8::Null(isolate); | 88 return v8::Null(isolate); |
89 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestDoNotCheckCon
stantsInterface>(impl, isolate); | 89 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceDoNo
tCheckConstants>(impl, isolate); |
90 if (!wrapper.IsEmpty()) | 90 if (!wrapper.IsEmpty()) |
91 return wrapper; | 91 return wrapper; |
92 return wrap(impl, creationContext, isolate); | 92 return wrap(impl, creationContext, isolate); |
93 } | 93 } |
94 | 94 |
95 template<typename CallbackInfo> | 95 template<typename CallbackInfo> |
96 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestDoNotCheckCon
stantsInterface* impl) | 96 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceDoNo
tCheckConstants* impl) |
97 { | 97 { |
98 if (UNLIKELY(!impl)) { | 98 if (UNLIKELY(!impl)) { |
99 v8SetReturnValueNull(callbackInfo); | 99 v8SetReturnValueNull(callbackInfo); |
100 return; | 100 return; |
101 } | 101 } |
102 if (DOMDataStore::setReturnValueFromWrapper<V8TestDoNotCheckConstantsInterfa
ce>(callbackInfo.GetReturnValue(), impl)) | 102 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceDoNotCheckConstan
ts>(callbackInfo.GetReturnValue(), impl)) |
103 return; | 103 return; |
104 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 104 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
105 v8SetReturnValue(callbackInfo, wrapper); | 105 v8SetReturnValue(callbackInfo, wrapper); |
106 } | 106 } |
107 | 107 |
108 template<typename CallbackInfo> | 108 template<typename CallbackInfo> |
109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestD
oNotCheckConstantsInterface* impl) | 109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfaceDoNotCheckConstants* impl) |
110 { | 110 { |
111 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); | 111 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); |
112 if (UNLIKELY(!impl)) { | 112 if (UNLIKELY(!impl)) { |
113 v8SetReturnValueNull(callbackInfo); | 113 v8SetReturnValueNull(callbackInfo); |
114 return; | 114 return; |
115 } | 115 } |
116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestDoNotCheckCons
tantsInterface>(callbackInfo.GetReturnValue(), impl)) | 116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceDoNot
CheckConstants>(callbackInfo.GetReturnValue(), impl)) |
117 return; | 117 return; |
118 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); | 118 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); |
119 v8SetReturnValue(callbackInfo, wrapper); | 119 v8SetReturnValue(callbackInfo, wrapper); |
120 } | 120 } |
121 | 121 |
122 template<class CallbackInfo, class Wrappable> | 122 template<class CallbackInfo, class Wrappable> |
123 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestDoNotChec
kConstantsInterface* impl, Wrappable* wrappable) | 123 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
DoNotCheckConstants* impl, Wrappable* wrappable) |
124 { | 124 { |
125 if (UNLIKELY(!impl)) { | 125 if (UNLIKELY(!impl)) { |
126 v8SetReturnValueNull(callbackInfo); | 126 v8SetReturnValueNull(callbackInfo); |
127 return; | 127 return; |
128 } | 128 } |
129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestDoNotCheckConstantsInt
erface>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) | 129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceDoNotCheckCon
stants>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) |
130 return; | 130 return; |
131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
132 v8SetReturnValue(callbackInfo, wrapper); | 132 v8SetReturnValue(callbackInfo, wrapper); |
133 } | 133 } |
134 | 134 |
135 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestDoNotCheckConstantsInterface >
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 135 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceDoNotCheckConstants >
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
136 { | 136 { |
137 return toV8(impl.get(), creationContext, isolate); | 137 return toV8(impl.get(), creationContext, isolate); |
138 } | 138 } |
139 | 139 |
140 template<class CallbackInfo> | 140 template<class CallbackInfo> |
141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestDo
NotCheckConstantsInterface > impl) | 141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfaceDoNotCheckConstants > impl) |
142 { | 142 { |
143 v8SetReturnValue(callbackInfo, impl.get()); | 143 v8SetReturnValue(callbackInfo, impl.get()); |
144 } | 144 } |
145 | 145 |
146 template<class CallbackInfo> | 146 template<class CallbackInfo> |
147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestDoNotCheckConstantsInterface > impl) | 147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfaceDoNotCheckConstants > impl) |
148 { | 148 { |
149 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 149 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
150 } | 150 } |
151 | 151 |
152 template<class CallbackInfo, class Wrappable> | 152 template<class CallbackInfo, class Wrappable> |
153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stDoNotCheckConstantsInterface > impl, Wrappable* wrappable) | 153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceDoNotCheckConstants > impl, Wrappable* wrappable) |
154 { | 154 { |
155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
156 } | 156 } |
157 | 157 |
158 } | 158 } |
159 #endif // V8TestDoNotCheckConstantsInterface_h | 159 #endif // V8TestInterfaceDoNotCheckConstants_h |
OLD | NEW |