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 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestInterfaceNode.h" | 8 #include "V8TestInterfaceNode.h" |
9 | 9 |
10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | 54 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); |
55 } | 55 } |
56 | 56 |
57 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 57 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
58 { | 58 { |
59 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 59 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
60 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); | 60 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); |
61 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 61 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
62 } | 62 } |
63 | 63 |
64 static void stringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v
8::PropertyCallbackInfo<void>& info) | 64 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
65 { | 65 { |
66 v8::Handle<v8::Object> holder = info.Holder(); | 66 v8::Handle<v8::Object> holder = info.Holder(); |
67 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); | 67 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); |
68 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 68 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
69 impl->setStringAttribute(cppValue); | 69 impl->setStringAttribute(cppValue); |
70 } | 70 } |
71 | 71 |
72 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 72 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
73 { | 73 { |
74 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 74 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
75 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(jsValue, info); | 75 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info); |
76 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
77 } | 77 } |
78 | 78 |
79 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 79 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
80 { | 80 { |
81 v8::Handle<v8::Object> holder = info.Holder(); | 81 v8::Handle<v8::Object> holder = info.Holder(); |
82 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); | 82 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); |
83 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri
bute()), impl); | 83 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri
bute()), impl); |
84 } | 84 } |
85 | 85 |
86 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 86 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
87 { | 87 { |
88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
89 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); | 89 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); |
90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
91 } | 91 } |
92 | 92 |
93 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 93 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
94 { | 94 { |
95 v8::Handle<v8::Object> holder = info.Holder(); | 95 v8::Handle<v8::Object> holder = info.Holder(); |
96 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); | 96 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); |
97 EventListener* jsValue = impl->eventHandlerAttribute(); | 97 EventListener* v8Value = impl->eventHandlerAttribute(); |
98 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); | 98 v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
99 } | 99 } |
100 | 100 |
101 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 101 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
102 { | 102 { |
103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
104 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); | 104 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); |
105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
106 } | 106 } |
107 | 107 |
108 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 108 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
109 { | 109 { |
110 v8::Handle<v8::Object> holder = info.Holder(); | 110 v8::Handle<v8::Object> holder = info.Holder(); |
111 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); | 111 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); |
112 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue
, true, ListenerFindOrCreate)); | 112 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(v8Value
, true, ListenerFindOrCreate)); |
113 } | 113 } |
114 | 114 |
115 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 115 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
116 { | 116 { |
117 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 117 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
118 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); | 118 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i
nfo); |
119 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
120 } | 120 } |
121 | 121 |
122 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 122 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
123 { | 123 { |
124 v8::Handle<v8::Object> holder = info.Holder(); | 124 v8::Handle<v8::Object> holder = info.Holder(); |
125 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); | 125 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); |
126 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt
erfaceEmptyAttribute()), impl); | 126 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt
erfaceEmptyAttribute()), impl); |
127 } | 127 } |
128 | 128 |
(...skipping 25 matching lines...) Expand all Loading... |
154 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring
attributeAttr), info.GetIsolate()); | 154 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring
attributeAttr), info.GetIsolate()); |
155 } | 155 } |
156 | 156 |
157 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 157 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
158 { | 158 { |
159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
160 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); | 160 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); |
161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
162 } | 162 } |
163 | 163 |
164 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 164 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
165 { | 165 { |
166 v8::Handle<v8::Object> holder = info.Holder(); | 166 v8::Handle<v8::Object> holder = info.Holder(); |
167 Element* impl = V8Element::toNative(holder); | 167 Element* impl = V8Element::toNative(holder); |
168 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 168 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
169 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); | 169 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); |
170 } | 170 } |
171 | 171 |
172 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 172 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
173 { | 173 { |
174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
175 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 175 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
176 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(jsValue,
info); | 176 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value,
info); |
177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
178 } | 178 } |
179 | 179 |
180 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 180 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
181 { | 181 { |
182 v8::Handle<v8::Object> holder = info.Holder(); | 182 v8::Handle<v8::Object> holder = info.Holder(); |
183 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); | 183 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(holder); |
184 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri
ngattributeAttr), info.GetIsolate()); | 184 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri
ngattributeAttr), info.GetIsolate()); |
185 } | 185 } |
186 | 186 |
187 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 187 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
188 { | 188 { |
189 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 189 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
190 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); | 190 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); |
191 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
192 } | 192 } |
193 | 193 |
194 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 194 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
195 { | 195 { |
196 v8::Handle<v8::Object> holder = info.Holder(); | 196 v8::Handle<v8::Object> holder = info.Holder(); |
197 Element* impl = V8Element::toNative(holder); | 197 Element* impl = V8Element::toNative(holder); |
198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
199 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); | 199 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); |
200 } | 200 } |
201 | 201 |
202 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 202 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
203 { | 203 { |
204 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 204 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
205 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 205 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
206 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(jsValu
e, info); | 206 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu
e, info); |
207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
208 } | 208 } |
209 | 209 |
210 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 210 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
211 { | 211 { |
212 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); | 212 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
213 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im
pl); | 213 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im
pl); |
214 } | 214 } |
215 | 215 |
216 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 216 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 if (!result.IsEmpty()) | 323 if (!result.IsEmpty()) |
324 return result; | 324 return result; |
325 | 325 |
326 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 326 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
327 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 327 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
328 configureV8TestInterfaceNodeTemplate(result, isolate); | 328 configureV8TestInterfaceNodeTemplate(result, isolate); |
329 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 329 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
330 return result; | 330 return result; |
331 } | 331 } |
332 | 332 |
333 bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate
* isolate) | 333 bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate
* isolate) |
334 { | 334 { |
335 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 335 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
336 } | 336 } |
337 | 337 |
338 v8::Handle<v8::Object> V8TestInterfaceNode::findInstanceInPrototypeChain(v8::Han
dle<v8::Value> jsValue, v8::Isolate* isolate) | 338 v8::Handle<v8::Object> V8TestInterfaceNode::findInstanceInPrototypeChain(v8::Han
dle<v8::Value> v8Value, v8::Isolate* isolate) |
339 { | 339 { |
340 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 340 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
341 } | 341 } |
342 | 342 |
343 TestInterfaceNode* V8TestInterfaceNode::toNativeWithTypeCheck(v8::Isolate* isola
te, v8::Handle<v8::Value> value) | 343 TestInterfaceNode* V8TestInterfaceNode::toNativeWithTypeCheck(v8::Isolate* isola
te, v8::Handle<v8::Value> value) |
344 { | 344 { |
345 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 345 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
346 } | 346 } |
347 | 347 |
348 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object) | 348 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object) |
349 { | 349 { |
350 return toNative(object); | 350 return toNative(object); |
(...skipping 24 matching lines...) Expand all Loading... |
375 fromInternalPointer(object)->deref(); | 375 fromInternalPointer(object)->deref(); |
376 } | 376 } |
377 | 377 |
378 template<> | 378 template<> |
379 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) | 379 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) |
380 { | 380 { |
381 return toV8(impl, creationContext, isolate); | 381 return toV8(impl, creationContext, isolate); |
382 } | 382 } |
383 | 383 |
384 } // namespace WebCore | 384 } // namespace WebCore |
OLD | NEW |