Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceNode.cpp

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceNode.h" 8 #include "V8TestInterfaceNode.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // bindings/core/v8/ScriptWrappable.h. 46 // bindings/core/v8/ScriptWrappable.h.
47 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod e::wrapperTypeInfo; 47 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod e::wrapperTypeInfo;
48 48
49 namespace TestInterfaceNodeV8Internal { 49 namespace TestInterfaceNodeV8Internal {
50 50
51 template <typename T> void V8_USE(T) { } 51 template <typename T> void V8_USE(T) { }
52 52
53 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 53 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
54 { 54 {
55 v8::Handle<v8::Object> holder = info.Holder(); 55 v8::Handle<v8::Object> holder = info.Holder();
56 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 56 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
57 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); 57 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
58 } 58 }
59 59
60 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 60 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
61 { 61 {
62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
63 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); 63 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info);
64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
65 } 65 }
66 66
67 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info) 67 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
68 { 68 {
69 v8::Handle<v8::Object> holder = info.Holder(); 69 v8::Handle<v8::Object> holder = info.Holder();
70 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 70 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
71 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 71 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
72 impl->setStringAttribute(cppValue); 72 impl->setStringAttribute(cppValue);
73 } 73 }
74 74
75 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 75 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
76 { 76 {
77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
78 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info); 78 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info);
79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
80 } 80 }
81 81
82 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info) 82 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info)
83 { 83 {
84 v8::Handle<v8::Object> holder = info.Holder(); 84 v8::Handle<v8::Object> holder = info.Holder();
85 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 85 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
86 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri bute()), impl); 86 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri bute()), impl);
87 } 87 }
88 88
89 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 89 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
90 { 90 {
91 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 91 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
92 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet ter(info); 92 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet ter(info);
93 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 93 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
94 } 94 }
95 95
96 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 96 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
97 { 97 {
98 v8::Handle<v8::Object> holder = info.Holder(); 98 v8::Handle<v8::Object> holder = info.Holder();
99 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 99 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
100 EventListener* cppValue(impl->eventHandlerAttribute()); 100 EventListener* cppValue(impl->eventHandlerAttribute());
101 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v 8::Value>(v8::Null(info.GetIsolate()))); 101 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v 8::Value>(v8::Null(info.GetIsolate())));
102 } 102 }
103 103
104 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 104 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
105 { 105 {
106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
107 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); 107 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info);
108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
109 } 109 }
110 110
111 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info) 111 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
112 { 112 {
113 v8::Handle<v8::Object> holder = info.Holder(); 113 v8::Handle<v8::Object> holder = info.Holder();
114 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 114 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
115 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); 115 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate));
116 } 116 }
117 117
118 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 118 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
119 { 119 {
120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
121 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i nfo); 121 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i nfo);
122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
123 } 123 }
124 124
125 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::PropertyCallbackInfo<v8::Value>& info) 125 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::PropertyCallbackInfo<v8::Value>& info)
126 { 126 {
127 v8::Handle<v8::Object> holder = info.Holder(); 127 v8::Handle<v8::Object> holder = info.Holder();
128 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 128 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
129 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt erfaceEmptyAttribute()), impl); 129 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt erfaceEmptyAttribute()), impl);
130 } 130 }
131 131
132 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 132 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
133 { 133 {
134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
135 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetter(info); 135 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetter(info);
136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
137 } 137 }
138 138
139 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) 139 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
140 { 140 {
141 v8::Handle<v8::Object> holder = info.Holder(); 141 v8::Handle<v8::Object> holder = info.Holder();
142 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 142 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
143 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl yTestInterfaceEmptyAttribute())); 143 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl yTestInterfaceEmptyAttribute()));
144 } 144 }
145 145
146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val ue>& info) 146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val ue>& info)
147 { 147 {
148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
149 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetterForMainWorld(info); 149 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetterForMainWorld(info);
150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
151 } 151 }
152 152
153 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 153 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
154 { 154 {
155 v8::Handle<v8::Object> holder = info.Holder(); 155 v8::Handle<v8::Object> holder = info.Holder();
156 Element* impl = V8Element::toNative(holder); 156 Element* impl = V8Element::toImpl(holder);
157 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring attributeAttr), info.GetIsolate()); 157 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring attributeAttr), info.GetIsolate());
158 } 158 }
159 159
160 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 160 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
161 { 161 {
162 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 162 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
163 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); 163 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info);
164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
165 } 165 }
166 166
167 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 167 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
168 { 168 {
169 v8::Handle<v8::Object> holder = info.Holder(); 169 v8::Handle<v8::Object> holder = info.Holder();
170 Element* impl = V8Element::toNative(holder); 170 Element* impl = V8Element::toImpl(holder);
171 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 171 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
172 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); 172 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
173 } 173 }
174 174
175 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 175 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
176 { 176 {
177 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 177 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
178 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 178 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
179 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value, info); 179 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value, info);
180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
181 } 181 }
182 182
183 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 183 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
184 { 184 {
185 v8::Handle<v8::Object> holder = info.Holder(); 185 v8::Handle<v8::Object> holder = info.Holder();
186 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); 186 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
187 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri ngattributeAttr), info.GetIsolate()); 187 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri ngattributeAttr), info.GetIsolate());
188 } 188 }
189 189
190 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 190 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
191 { 191 {
192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
193 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); 193 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info);
194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
195 } 195 }
196 196
197 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info) 197 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
198 { 198 {
199 v8::Handle<v8::Object> holder = info.Holder(); 199 v8::Handle<v8::Object> holder = info.Holder();
200 Element* impl = V8Element::toNative(holder); 200 Element* impl = V8Element::toImpl(holder);
201 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 201 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
202 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); 202 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
203 } 203 }
204 204
205 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 205 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
206 { 206 {
207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
208 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 208 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
209 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu e, info); 209 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu e, info);
210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
211 } 211 }
212 212
213 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 213 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
214 { 214 {
215 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); 215 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
216 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im pl); 216 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im pl);
217 } 217 }
218 218
219 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 219 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
220 { 220 {
221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
222 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info); 222 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info);
223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
224 } 224 }
225 225
226 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 226 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
227 { 227 {
228 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); 228 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
229 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEm ptyMethod()), impl); 229 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEm ptyMethod()), impl);
230 } 230 }
231 231
232 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 232 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
233 { 233 {
234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
235 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod( info); 235 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod( info);
236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
237 } 237 }
238 238
239 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info) 239 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info)
240 { 240 {
241 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); 241 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
242 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInt erfaceEmptyMethod())); 242 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInt erfaceEmptyMethod()));
243 } 243 }
244 244
245 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info) 245 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info)
246 { 246 {
247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
248 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF orMainWorld(info); 248 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF orMainWorld(info);
249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
250 } 250 }
251 251
252 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con st v8::FunctionCallbackInfo<v8::Value>& info) 252 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con st v8::FunctionCallbackInfo<v8::Value>& info)
253 { 253 {
254 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); 254 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
255 bool optionalBooleanArgument; 255 bool optionalBooleanArgument;
256 { 256 {
257 v8::TryCatch block; 257 v8::TryCatch block;
258 V8RethrowTryCatchScope rethrow(block); 258 V8RethrowTryCatchScope rethrow(block);
259 if (UNLIKELY(info.Length() <= 0)) { 259 if (UNLIKELY(info.Length() <= 0)) {
260 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInt erfaceEmptyMethodOptionalBooleanArg()), impl); 260 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInt erfaceEmptyMethodOptionalBooleanArg()), impl);
261 return; 261 return;
262 } 262 }
263 TONATIVE_VOID_INTERNAL(optionalBooleanArgument, info[0]->BooleanValue()) ; 263 TONATIVE_VOID_INTERNAL(optionalBooleanArgument, info[0]->BooleanValue()) ;
264 } 264 }
265 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEm ptyMethodOptionalBooleanArg(optionalBooleanArgument)), impl); 265 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEm ptyMethodOptionalBooleanArg(optionalBooleanArgument)), impl);
266 } 266 }
267 267
268 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info) 268 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
269 { 269 {
270 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 270 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
271 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethod(info); 271 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethod(info);
272 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 272 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
273 } 273 }
274 274
275 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 275 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
276 { 276 {
277 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); 277 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
278 bool optionalBooleanArgument; 278 bool optionalBooleanArgument;
279 { 279 {
280 v8::TryCatch block; 280 v8::TryCatch block;
281 V8RethrowTryCatchScope rethrow(block); 281 V8RethrowTryCatchScope rethrow(block);
282 if (UNLIKELY(info.Length() <= 0)) { 282 if (UNLIKELY(info.Length() <= 0)) {
283 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBinding sTestInterfaceEmptyMethodOptionalBooleanArg())); 283 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBinding sTestInterfaceEmptyMethodOptionalBooleanArg()));
284 return; 284 return;
285 } 285 }
286 TONATIVE_VOID_INTERNAL(optionalBooleanArgument, info[0]->BooleanValue()) ; 286 TONATIVE_VOID_INTERNAL(optionalBooleanArgument, info[0]->BooleanValue()) ;
287 } 287 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate * isolate) 337 bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate * isolate)
338 { 338 {
339 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 339 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
340 } 340 }
341 341
342 v8::Handle<v8::Object> V8TestInterfaceNode::findInstanceInPrototypeChain(v8::Han dle<v8::Value> v8Value, v8::Isolate* isolate) 342 v8::Handle<v8::Object> V8TestInterfaceNode::findInstanceInPrototypeChain(v8::Han dle<v8::Value> v8Value, v8::Isolate* isolate)
343 { 343 {
344 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 344 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
345 } 345 }
346 346
347 TestInterfaceNode* V8TestInterfaceNode::toNativeWithTypeCheck(v8::Isolate* isola te, v8::Handle<v8::Value> value) 347 TestInterfaceNode* V8TestInterfaceNode::toImplWithTypeCheck(v8::Isolate* isolate , v8::Handle<v8::Value> value)
348 { 348 {
349 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 349 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle <v8::Object>::Cast(value))->toImpl<TestInterfaceNode>() : 0;
350 } 350 }
351 351
352 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object) 352 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object)
353 { 353 {
354 return toNative(object); 354 return toImpl(object);
355 } 355 }
356 356
357 357
358 void V8TestInterfaceNode::refObject(ScriptWrappableBase* internalPointer) 358 void V8TestInterfaceNode::refObject(ScriptWrappableBase* internalPointer)
359 { 359 {
360 #if !ENABLE(OILPAN) 360 #if !ENABLE(OILPAN)
361 fromInternalPointer(internalPointer)->ref(); 361 internalPointer->toImpl<TestInterfaceNode>()->ref();
362 #endif 362 #endif
363 } 363 }
364 364
365 void V8TestInterfaceNode::derefObject(ScriptWrappableBase* internalPointer) 365 void V8TestInterfaceNode::derefObject(ScriptWrappableBase* internalPointer)
366 { 366 {
367 #if !ENABLE(OILPAN) 367 #if !ENABLE(OILPAN)
368 fromInternalPointer(internalPointer)->deref(); 368 internalPointer->toImpl<TestInterfaceNode>()->deref();
369 #endif 369 #endif
370 } 370 }
371 371
372 WrapperPersistentNode* V8TestInterfaceNode::createPersistentHandle(ScriptWrappab leBase* internalPointer) 372 WrapperPersistentNode* V8TestInterfaceNode::createPersistentHandle(ScriptWrappab leBase* internalPointer)
373 { 373 {
374 #if ENABLE(OILPAN) 374 #if ENABLE(OILPAN)
375 return new WrapperPersistent<TestInterfaceNode>(fromInternalPointer(internal Pointer)); 375 return new WrapperPersistent<TestInterfaceNode>(internalPointer->toImpl<Test InterfaceNode>());
376 #else 376 #else
377 ASSERT_NOT_REACHED(); 377 ASSERT_NOT_REACHED();
378 return 0; 378 return 0;
379 #endif 379 #endif
380 } 380 }
381 381
382 template<> 382 template<>
383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate) 383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate)
384 { 384 {
385 return toV8(impl, creationContext, isolate); 385 return toV8(impl, creationContext, isolate);
386 } 386 }
387 387
388 } // namespace blink 388 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceNode.h ('k') | Source/bindings/tests/results/V8TestInterfaceNotScriptWrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698