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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 99 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
100 { | 100 { |
101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
102 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(jsValue, info); | 102 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(jsValue, info); |
103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
104 } | 104 } |
105 | 105 |
106 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 106 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
107 { | 107 { |
108 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 108 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
109 v8SetReturnValueFast(info, imp->readonlyTestInterfaceEmptyAttribute(), imp); | 109 v8SetReturnValueFast(info, WTF::getPtr(imp->readonlyTestInterfaceEmptyAttrib
ute()), imp); |
110 } | 110 } |
111 | 111 |
112 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 112 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
113 { | 113 { |
114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
115 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); | 115 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); |
116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
117 } | 117 } |
118 | 118 |
119 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 119 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
(...skipping 19 matching lines...) Expand all Loading... |
139 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 139 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
140 { | 140 { |
141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
142 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); | 142 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); |
143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
144 } | 144 } |
145 | 145 |
146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
147 { | 147 { |
148 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 148 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
149 v8SetReturnValueFast(info, imp->perWorldBindingsReadonlyTestInterfaceEmptyAt
tribute(), imp); | 149 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsReadonlyTestInte
rfaceEmptyAttribute()), imp); |
150 } | 150 } |
151 | 151 |
152 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 152 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
153 { | 153 { |
154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
155 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetter(info); | 155 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetter(info); |
156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
157 } | 157 } |
158 | 158 |
159 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 159 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
160 { | 160 { |
161 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 161 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
162 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsReadonlyTestInterfac
eEmptyAttribute()); | 162 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsReadonly
TestInterfaceEmptyAttribute())); |
163 } | 163 } |
164 | 164 |
165 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 165 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
166 { | 166 { |
167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
168 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetterForMainWorld(info); | 168 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetterForMainWorld(info); |
169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
170 } | 170 } |
171 | 171 |
172 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 172 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 { | 221 { |
222 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 222 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
223 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 223 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
224 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(jsValu
e, info); | 224 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(jsValu
e, info); |
225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
226 } | 226 } |
227 | 227 |
228 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 228 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
229 { | 229 { |
230 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 230 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
231 v8SetReturnValueFast(info, imp->testInterfaceEmptyMethod(), imp); | 231 v8SetReturnValueFast(info, WTF::getPtr(imp->testInterfaceEmptyMethod()), imp
); |
232 } | 232 } |
233 | 233 |
234 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 234 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
235 { | 235 { |
236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
237 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info); | 237 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info); |
238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
239 } | 239 } |
240 | 240 |
241 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 241 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
242 { | 242 { |
243 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 243 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
244 v8SetReturnValueFast(info, imp->perWorldBindingsTestInterfaceEmptyMethod(),
imp); | 244 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsTestInterfaceEmp
tyMethod()), imp); |
245 } | 245 } |
246 | 246 |
247 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 247 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
248 { | 248 { |
249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
250 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod(
info); | 250 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod(
info); |
251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
252 } | 252 } |
253 | 253 |
254 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 254 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
255 { | 255 { |
256 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 256 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
257 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsTestInterfaceEmptyMe
thod()); | 257 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsTestInte
rfaceEmptyMethod())); |
258 } | 258 } |
259 | 259 |
260 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 260 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
261 { | 261 { |
262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
263 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF
orMainWorld(info); | 263 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF
orMainWorld(info); |
264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
265 } | 265 } |
266 | 266 |
267 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 267 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
268 { | 268 { |
269 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 269 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
270 if (UNLIKELY(info.Length() <= 0)) { | 270 if (UNLIKELY(info.Length() <= 0)) { |
271 v8SetReturnValueFast(info, imp->perWorldBindingsTestInterfaceEmptyMethod
OptionalBooleanArg(), imp); | 271 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsTestInterfac
eEmptyMethodOptionalBooleanArg()), imp); |
272 return; | 272 return; |
273 } | 273 } |
274 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); | 274 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); |
275 v8SetReturnValueFast(info, imp->perWorldBindingsTestInterfaceEmptyMethodOpti
onalBooleanArg(optionalBooleanArgument), imp); | 275 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsTestInterfaceEmp
tyMethodOptionalBooleanArg(optionalBooleanArgument)), imp); |
276 } | 276 } |
277 | 277 |
278 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 278 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
279 { | 279 { |
280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
281 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethod(info); | 281 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethod(info); |
282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
283 } | 283 } |
284 | 284 |
285 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 285 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
286 { | 286 { |
287 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 287 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
288 if (UNLIKELY(info.Length() <= 0)) { | 288 if (UNLIKELY(info.Length() <= 0)) { |
289 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsTestInterfaceEmp
tyMethodOptionalBooleanArg()); | 289 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsTest
InterfaceEmptyMethodOptionalBooleanArg())); |
290 return; | 290 return; |
291 } | 291 } |
292 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); | 292 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); |
293 v8SetReturnValueForMainWorld(info, imp->perWorldBindingsTestInterfaceEmptyMe
thodOptionalBooleanArg(optionalBooleanArgument)); | 293 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsTestInte
rfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument))); |
294 } | 294 } |
295 | 295 |
296 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 296 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
297 { | 297 { |
298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
299 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethodForMainWorld(info); | 299 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethodForMainWorld(info); |
300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
301 } | 301 } |
302 | 302 |
303 } // namespace TestInterfaceNodeV8Internal | 303 } // namespace TestInterfaceNodeV8Internal |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 fromInternalPointer(object)->deref(); | 393 fromInternalPointer(object)->deref(); |
394 } | 394 } |
395 | 395 |
396 template<> | 396 template<> |
397 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) | 397 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) |
398 { | 398 { |
399 return toV8(impl, creationContext, isolate); | 399 return toV8(impl, creationContext, isolate); |
400 } | 400 } |
401 | 401 |
402 } // namespace WebCore | 402 } // namespace WebCore |
OLD | NEW |