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 23 matching lines...) Expand all Loading... |
34 #if ENABLE(CONDITION) | 34 #if ENABLE(CONDITION) |
35 #include "V8TestInterfacePython.h" | 35 #include "V8TestInterfacePython.h" |
36 | 36 |
37 #include "RuntimeEnabledFeatures.h" | 37 #include "RuntimeEnabledFeatures.h" |
38 #include "V8Node.h" | 38 #include "V8Node.h" |
39 #include "V8ReferencedType.h" | 39 #include "V8ReferencedType.h" |
40 #include "V8TestImplementedAs.h" | 40 #include "V8TestImplementedAs.h" |
41 #include "V8TestInterfaceEmpty.h" | 41 #include "V8TestInterfaceEmpty.h" |
42 #include "bindings/tests/idls/TestImplements.h" | 42 #include "bindings/tests/idls/TestImplements.h" |
43 #include "bindings/tests/idls/TestImplements2Implementation.h" | 43 #include "bindings/tests/idls/TestImplements2Implementation.h" |
| 44 #include "bindings/tests/idls/TestImplements3.h" |
44 #include "bindings/tests/idls/TestPartialInterfacePython.h" | 45 #include "bindings/tests/idls/TestPartialInterfacePython.h" |
45 #include "bindings/tests/idls/TestPartialInterfacePythonImplementation.h" | 46 #include "bindings/tests/idls/TestPartialInterfacePythonImplementation.h" |
46 #include "bindings/v8/ExceptionState.h" | 47 #include "bindings/v8/ExceptionState.h" |
47 #include "bindings/v8/V8AbstractEventListener.h" | 48 #include "bindings/v8/V8AbstractEventListener.h" |
48 #include "bindings/v8/V8DOMConfiguration.h" | 49 #include "bindings/v8/V8DOMConfiguration.h" |
49 #include "bindings/v8/V8EventListenerList.h" | 50 #include "bindings/v8/V8EventListenerList.h" |
50 #include "bindings/v8/V8ObjectConstructor.h" | 51 #include "bindings/v8/V8ObjectConstructor.h" |
51 #include "core/dom/ContextFeatures.h" | 52 #include "core/dom/ContextFeatures.h" |
52 #include "core/dom/Document.h" | 53 #include "core/dom/Document.h" |
53 #include "platform/TraceEvent.h" | 54 #include "platform/TraceEvent.h" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 447 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
447 { | 448 { |
448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
449 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri
buteSetter(jsValue, info); | 450 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri
buteSetter(jsValue, info); |
450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
451 } | 452 } |
452 | 453 |
453 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 454 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
454 { | 455 { |
455 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 456 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
456 v8SetReturnValueString(info, imp->implements3StringAttribute(), info.GetIsol
ate()); | 457 v8SetReturnValueString(info, TestImplements3::implements3StringAttribute(imp
), info.GetIsolate()); |
457 } | 458 } |
458 | 459 |
459 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 460 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
460 { | 461 { |
461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 462 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
462 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteGetter(info); | 463 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteGetter(info); |
463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 464 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
464 } | 465 } |
465 | 466 |
466 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 467 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) |
467 { | 468 { |
468 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 469 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
469 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 470 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
470 imp->setImplements3StringAttribute(cppValue); | 471 TestImplements3::setImplements3StringAttribute(imp, cppValue); |
471 } | 472 } |
472 | 473 |
473 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 474 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
474 { | 475 { |
475 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
476 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteSetter(jsValue, info); | 477 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteSetter(jsValue, info); |
477 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
478 } | 479 } |
479 | 480 |
480 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 481 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
481 { | 482 { |
482 v8SetReturnValueString(info, TestInterfacePythonImplementation::implements3S
taticStringAttribute(), info.GetIsolate()); | 483 v8SetReturnValueString(info, TestImplements3::implements3StaticStringAttribu
te(), info.GetIsolate()); |
483 } | 484 } |
484 | 485 |
485 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 486 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
486 { | 487 { |
487 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
488 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeGetter(info); | 489 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeGetter(info); |
489 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
490 } | 491 } |
491 | 492 |
492 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 493 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
493 { | 494 { |
494 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 495 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
495 TestInterfacePythonImplementation::setImplements3StaticStringAttribute(cppVa
lue); | 496 TestImplements3::setImplements3StaticStringAttribute(cppValue); |
496 } | 497 } |
497 | 498 |
498 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 499 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) |
499 { | 500 { |
500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
501 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeSetter(jsValue, info); | 502 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeSetter(jsValue, info); |
502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
503 } | 504 } |
504 | 505 |
505 #if ENABLE(PARTIAL_CONDITION) | 506 #if ENABLE(PARTIAL_CONDITION) |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 804 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
804 { | 805 { |
805 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 806 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
806 TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(inf
o); | 807 TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(inf
o); |
807 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 808 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
808 } | 809 } |
809 | 810 |
810 static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 811 static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
811 { | 812 { |
812 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 813 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
813 imp->implements3VoidMethod(); | 814 TestImplements3::implements3VoidMethod(imp); |
814 } | 815 } |
815 | 816 |
816 static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 817 static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
817 { | 818 { |
818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 819 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
819 TestInterfacePythonImplementationV8Internal::implements3VoidMethodMethod(inf
o); | 820 TestInterfacePythonImplementationV8Internal::implements3VoidMethodMethod(inf
o); |
820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
821 } | 822 } |
822 | 823 |
823 static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 824 static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
824 { | 825 { |
825 TestInterfacePythonImplementation::implements3StaticVoidMethod(); | 826 TestImplements3::implements3StaticVoidMethod(); |
826 } | 827 } |
827 | 828 |
828 static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 829 static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
829 { | 830 { |
830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 831 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
831 TestInterfacePythonImplementationV8Internal::implements3StaticVoidMethodMeth
od(info); | 832 TestInterfacePythonImplementationV8Internal::implements3StaticVoidMethodMeth
od(info); |
832 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 833 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
833 } | 834 } |
834 | 835 |
835 #if ENABLE(PARTIAL_CONDITION) | 836 #if ENABLE(PARTIAL_CONDITION) |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 } | 1107 } |
1107 | 1108 |
1108 template<> | 1109 template<> |
1109 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 1110 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
1110 { | 1111 { |
1111 return toV8(impl, creationContext, isolate); | 1112 return toV8(impl, creationContext, isolate); |
1112 } | 1113 } |
1113 | 1114 |
1114 } // namespace WebCore | 1115 } // namespace WebCore |
1115 #endif // ENABLE(CONDITION) | 1116 #endif // ENABLE(CONDITION) |
OLD | NEW |