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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 namespace WebCore { | 77 namespace WebCore { |
78 const WrapperTypeInfo V8TestInterfacePython::wrapperTypeInfo = { gin::kEmbedderB
link, V8TestInterfacePython::domTemplate, V8TestInterfacePython::derefObject, V8
TestInterfacePython::toActiveDOMObject, 0, V8TestInterfacePython::visitDOMWrappe
r, V8TestInterfacePython::installPerContextEnabledMethods, &V8TestInterfaceEmpty
::wrapperTypeInfo, WrapperTypeObjectPrototype, false }; | 78 const WrapperTypeInfo V8TestInterfacePython::wrapperTypeInfo = { gin::kEmbedderB
link, V8TestInterfacePython::domTemplate, V8TestInterfacePython::derefObject, V8
TestInterfacePython::toActiveDOMObject, 0, V8TestInterfacePython::visitDOMWrappe
r, V8TestInterfacePython::installPerContextEnabledMethods, &V8TestInterfaceEmpty
::wrapperTypeInfo, WrapperTypeObjectPrototype, false }; |
79 | 79 |
80 namespace TestInterfacePythonImplementationV8Internal { | 80 namespace TestInterfacePythonImplementationV8Internal { |
81 | 81 |
82 template <typename T> void V8_USE(T) { } | 82 template <typename T> void V8_USE(T) { } |
83 | 83 |
84 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 84 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
85 { | 85 { |
86 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 86 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
87 v8SetReturnValueFast(info, imp->testInterfacePythonAttribute(), imp); | 87 v8SetReturnValueFast(info, WTF::getPtr(imp->testInterfacePythonAttribute()),
imp); |
88 } | 88 } |
89 | 89 |
90 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 90 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
91 { | 91 { |
92 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 92 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
93 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt
ributeGetter(info); | 93 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt
ributeGetter(info); |
94 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
95 } | 95 } |
96 | 96 |
97 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV
alue, const v8::PropertyCallbackInfo<void>& info) | 97 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV
alue, const v8::PropertyCallbackInfo<void>& info) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 { | 270 { |
271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
272 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteSetter(jsValue, info); | 272 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteSetter(jsValue, info); |
273 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 273 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
274 } | 274 } |
275 | 275 |
276 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 276 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
277 { | 277 { |
278 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 278 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
279 ASSERT(imp); | 279 ASSERT(imp); |
280 v8SetReturnValueFast(info, TestImplements::implementsNodeAttribute(*imp), im
p); | 280 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsNodeAttribu
te(*imp)), imp); |
281 } | 281 } |
282 | 282 |
283 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 283 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
284 { | 284 { |
285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
286 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eGetter(info); | 286 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eGetter(info); |
287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
288 } | 288 } |
289 | 289 |
290 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 290 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 { | 337 { |
338 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 338 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
339 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeSetter(jsValue, info); | 339 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeSetter(jsValue, info); |
340 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 340 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
341 } | 341 } |
342 | 342 |
343 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 343 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
344 { | 344 { |
345 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 345 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
346 ASSERT(imp); | 346 ASSERT(imp); |
347 v8SetReturnValueFast(info, TestImplements::implementsRuntimeEnabledNodeAttri
bute(*imp), imp); | 347 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsRuntimeEnab
ledNodeAttribute(*imp)), imp); |
348 } | 348 } |
349 | 349 |
350 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 350 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
351 { | 351 { |
352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
353 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeGetter(info); | 353 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeGetter(info); |
354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
355 } | 355 } |
356 | 356 |
357 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 357 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
(...skipping 14 matching lines...) Expand all Loading... |
372 { | 372 { |
373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
374 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeSetter(jsValue, info); | 374 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeSetter(jsValue, info); |
375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
376 } | 376 } |
377 | 377 |
378 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 378 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
379 { | 379 { |
380 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 380 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
381 ASSERT(imp); | 381 ASSERT(imp); |
382 v8SetReturnValueFast(info, TestImplements::implementsPerContextEnabledNodeAt
tribute(*imp), imp); | 382 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsPerContextE
nabledNodeAttribute(*imp)), imp); |
383 } | 383 } |
384 | 384 |
385 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 385 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
386 { | 386 { |
387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
388 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode
AttributeAttributeGetter(info); | 388 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode
AttributeAttributeGetter(info); |
389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
390 } | 390 } |
391 | 391 |
392 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 392 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 } | 1060 } |
1061 | 1061 |
1062 template<> | 1062 template<> |
1063 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 1063 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
1064 { | 1064 { |
1065 return toV8(impl, creationContext, isolate); | 1065 return toV8(impl, creationContext, isolate); |
1066 } | 1066 } |
1067 | 1067 |
1068 } // namespace WebCore | 1068 } // namespace WebCore |
1069 #endif // ENABLE(CONDITION) | 1069 #endif // ENABLE(CONDITION) |
OLD | NEW |