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

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

Issue 329223004: [DeprecateAs] if call addEventListener or removeEventListener without enough arguments Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move ext attr to interface Created 6 years, 6 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 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
11 #include "RuntimeEnabledFeatures.h" 11 #include "RuntimeEnabledFeatures.h"
12 #include "bindings/tests/idls/TestImplements2.h" 12 #include "bindings/tests/idls/TestImplements2.h"
13 #include "bindings/tests/idls/TestImplements3Implementation.h" 13 #include "bindings/tests/idls/TestImplements3Implementation.h"
14 #include "bindings/tests/idls/TestPartialInterface.h" 14 #include "bindings/tests/idls/TestPartialInterface.h"
15 #include "bindings/tests/idls/TestPartialInterfaceImplementation.h" 15 #include "bindings/tests/idls/TestPartialInterfaceImplementation.h"
16 #include "bindings/tests/v8/V8Node.h" 16 #include "bindings/tests/v8/V8Node.h"
17 #include "bindings/tests/v8/V8TestInterface.h" 17 #include "bindings/tests/v8/V8TestInterface.h"
18 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" 18 #include "bindings/tests/v8/V8TestInterfaceEmpty.h"
19 #include "bindings/v8/BindingSecurity.h"
19 #include "bindings/v8/ExceptionState.h" 20 #include "bindings/v8/ExceptionState.h"
20 #include "bindings/v8/ScriptValue.h" 21 #include "bindings/v8/ScriptValue.h"
21 #include "bindings/v8/V8AbstractEventListener.h" 22 #include "bindings/v8/V8AbstractEventListener.h"
22 #include "bindings/v8/V8DOMConfiguration.h" 23 #include "bindings/v8/V8DOMConfiguration.h"
23 #include "bindings/v8/V8EventListenerList.h" 24 #include "bindings/v8/V8EventListenerList.h"
24 #include "bindings/v8/V8HiddenValue.h" 25 #include "bindings/v8/V8HiddenValue.h"
25 #include "bindings/v8/V8ObjectConstructor.h" 26 #include "bindings/v8/V8ObjectConstructor.h"
26 #include "core/dom/ContextFeatures.h" 27 #include "core/dom/ContextFeatures.h"
27 #include "core/dom/Document.h" 28 #include "core/dom/Document.h"
29 #include "core/frame/DOMWindow.h"
28 #include "platform/TraceEvent.h" 30 #include "platform/TraceEvent.h"
29 #include "wtf/GetPtr.h" 31 #include "wtf/GetPtr.h"
30 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
31 33
32 namespace WebCore { 34 namespace WebCore {
33 35
34 static void initializeScriptWrappableForInterface(TestInterfaceImplementation* o bject) 36 static void initializeScriptWrappableForInterface(TestInterfaceImplementation* o bject)
35 { 37 {
36 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 38 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
37 ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestInterface::wrapp erTypeInfo); 39 ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestInterface::wrapp erTypeInfo);
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); 790 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
789 } 791 }
790 792
791 static void TestInterfaceImplementationReplaceableAttributeSetterCallback(v8::Lo cal<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn fo<void>& info) 793 static void TestInterfaceImplementationReplaceableAttributeSetterCallback(v8::Lo cal<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn fo<void>& info)
792 { 794 {
793 TestInterfaceImplementationV8Internal::TestInterfaceImplementationReplaceabl eAttributeSetter(name, v8Value, info); 795 TestInterfaceImplementationV8Internal::TestInterfaceImplementationReplaceabl eAttributeSetter(name, v8Value, info);
794 } 796 }
795 797
796 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 798 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
797 { 799 {
800 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArg", "TestInterface", info.Holder(), info.GetIsolate());
798 if (UNLIKELY(info.Length() < 1)) { 801 if (UNLIKELY(info.Length() < 1)) {
799 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArg", " TestInterface", 1, info.Length(), info.GetIsolate()); 802 throwMinimumArityTypeError(exceptionState, 1, info.Length());
800 return; 803 return;
801 } 804 }
802 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 805 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
806 if (DOMWindow* window = impl->toDOMWindow()) {
807 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
808 exceptionState.throwIfNeeded();
809 return;
810 }
811 if (!window->document())
812 return;
813 }
803 TestInterfaceEmpty* testInterfaceEmptyArg; 814 TestInterfaceEmpty* testInterfaceEmptyArg;
804 { 815 {
805 v8::TryCatch block; 816 v8::TryCatch block;
806 V8RethrowTryCatchScope rethrow(block); 817 V8RethrowTryCatchScope rethrow(block);
807 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) { 818 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) {
808 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt erfaceEmptyArg", "TestInterface", "parameter 1 is not of type 'TestInterfaceEmpt y'."), info.GetIsolate()); 819 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'.");
820 exceptionState.throwIfNeeded();
809 return; 821 return;
810 } 822 }
811 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0])); 823 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0]));
812 } 824 }
813 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 825 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
814 } 826 }
815 827
816 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 828 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
817 { 829 {
818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
819 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod (info); 831 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod (info);
820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 832 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
821 } 833 }
822 834
823 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 835 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
824 { 836 {
837 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate());
825 if (UNLIKELY(info.Length() < 2)) { 838 if (UNLIKELY(info.Length() < 2)) {
826 throwMinimumArityTypeErrorForMethod("voidMethodDoubleArgFloatArg", "Test Interface", 2, info.Length(), info.GetIsolate()); 839 throwMinimumArityTypeError(exceptionState, 2, info.Length());
827 return; 840 return;
828 } 841 }
829 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 842 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
843 if (DOMWindow* window = impl->toDOMWindow()) {
844 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
845 exceptionState.throwIfNeeded();
846 return;
847 }
848 if (!window->document())
849 return;
850 }
830 double doubleArg; 851 double doubleArg;
831 float floatArg; 852 float floatArg;
832 { 853 {
833 v8::TryCatch block; 854 v8::TryCatch block;
834 V8RethrowTryCatchScope rethrow(block); 855 V8RethrowTryCatchScope rethrow(block);
835 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal ue())); 856 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal ue()));
836 if (!std::isfinite(doubleArg)) { 857 if (!std::isfinite(doubleArg)) {
837 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleA rgFloatArg", "TestInterface", "double parameter 1 is non-finite."), info.GetIsol ate()); 858 exceptionState.throwTypeError("double parameter 1 is non-finite.");
859 exceptionState.throwIfNeeded();
838 return; 860 return;
839 } 861 }
840 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[1]->NumberValue ())); 862 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[1]->NumberValue ()));
841 if (!std::isfinite(floatArg)) { 863 if (!std::isfinite(floatArg)) {
842 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleA rgFloatArg", "TestInterface", "float parameter 2 is non-finite."), info.GetIsola te()); 864 exceptionState.throwTypeError("float parameter 2 is non-finite.");
865 exceptionState.throwIfNeeded();
843 return; 866 return;
844 } 867 }
845 } 868 }
846 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); 869 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
847 } 870 }
848 871
849 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 872 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
850 { 873 {
851 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
852 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf o); 875 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf o);
853 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
854 } 877 }
855 878
856 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info) 879 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info)
857 { 880 {
881 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info. GetIsolate());
858 if (UNLIKELY(info.Length() < 2)) { 882 if (UNLIKELY(info.Length() < 2)) {
859 throwMinimumArityTypeErrorForMethod("voidMethodUnrestrictedDoubleArgUnre strictedFloatArg", "TestInterface", 2, info.Length(), info.GetIsolate()); 883 throwMinimumArityTypeError(exceptionState, 2, info.Length());
860 return; 884 return;
861 } 885 }
862 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 886 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
887 if (DOMWindow* window = impl->toDOMWindow()) {
888 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
889 exceptionState.throwIfNeeded();
890 return;
891 }
892 if (!window->document())
893 return;
894 }
863 double unrestrictedDoubleArg; 895 double unrestrictedDoubleArg;
864 float unrestrictedFloatArg; 896 float unrestrictedFloatArg;
865 { 897 {
866 v8::TryCatch block; 898 v8::TryCatch block;
867 V8RethrowTryCatchScope rethrow(block); 899 V8RethrowTryCatchScope rethrow(block);
868 TONATIVE_VOID_INTERNAL(unrestrictedDoubleArg, static_cast<double>(info[0 ]->NumberValue())); 900 TONATIVE_VOID_INTERNAL(unrestrictedDoubleArg, static_cast<double>(info[0 ]->NumberValue()));
869 TONATIVE_VOID_INTERNAL(unrestrictedFloatArg, static_cast<float>(info[1]- >NumberValue())); 901 TONATIVE_VOID_INTERNAL(unrestrictedFloatArg, static_cast<float>(info[1]- >NumberValue()));
870 } 902 }
871 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg); 903 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg);
872 } 904 }
873 905
874 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 906 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
875 { 907 {
876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 908 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
877 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest rictedFloatArgMethod(info); 909 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest rictedFloatArgMethod(info);
878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 910 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
879 } 911 }
880 912
881 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 913 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
882 { 914 {
915 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethod" , "TestInterface", info.Holder(), info.GetIsolate());
883 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 916 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
917 if (DOMWindow* window = impl->toDOMWindow()) {
918 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
919 exceptionState.throwIfNeeded();
920 return;
921 }
922 if (!window->document())
923 return;
924 }
884 impl->voidMethod(); 925 impl->voidMethod();
885 } 926 }
886 927
887 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 928 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
888 { 929 {
889 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 930 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
890 TestInterfaceImplementationV8Internal::voidMethodMethod(info); 931 TestInterfaceImplementationV8Internal::voidMethodMethod(info);
891 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 932 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
892 } 933 }
893 934
894 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info) 935 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info)
895 { 936 {
937 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethod" , "TestInterface", info.Holder(), info.GetIsolate());
896 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 938 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
939 if (DOMWindow* window = impl->toDOMWindow()) {
940 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
941 exceptionState.throwIfNeeded();
942 return;
943 }
944 if (!window->document())
945 return;
946 }
897 impl->voidMethod(); 947 impl->voidMethod();
898 } 948 }
899 949
900 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info) 950 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info)
901 { 951 {
902 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
903 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info); 953 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info);
904 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
905 } 955 }
906 956
907 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 957 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
908 { 958 {
959 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsV oidMethod", "TestInterface", info.Holder(), info.GetIsolate());
909 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 960 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
961 if (DOMWindow* window = impl->toDOMWindow()) {
962 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
963 exceptionState.throwIfNeeded();
964 return;
965 }
966 if (!window->document())
967 return;
968 }
910 impl->implementsVoidMethod(); 969 impl->implementsVoidMethod();
911 } 970 }
912 971
913 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 972 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
914 { 973 {
915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
916 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info); 975 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info);
917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
918 } 977 }
919 978
920 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 979 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
921 { 980 {
922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); 981 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterface", info.Holder(), info.GetIsolate());
923 if (UNLIKELY(info.Length() < 2)) { 982 if (UNLIKELY(info.Length() < 2)) {
924 throwMinimumArityTypeError(exceptionState, 2, info.Length()); 983 throwMinimumArityTypeError(exceptionState, 2, info.Length());
925 return; 984 return;
926 } 985 }
927 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 986 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
987 if (DOMWindow* window = impl->toDOMWindow()) {
988 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
989 exceptionState.throwIfNeeded();
990 return;
991 }
992 if (!window->document())
993 return;
994 }
928 V8StringResource<> strArg; 995 V8StringResource<> strArg;
929 TestInterfaceEmpty* testInterfaceEmptyArg; 996 TestInterfaceEmpty* testInterfaceEmptyArg;
930 { 997 {
931 v8::TryCatch block; 998 v8::TryCatch block;
932 V8RethrowTryCatchScope rethrow(block); 999 V8RethrowTryCatchScope rethrow(block);
933 TOSTRING_VOID_INTERNAL(strArg, info[0]); 1000 TOSTRING_VOID_INTERNAL(strArg, info[0]);
934 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf o.GetIsolate())) { 1001 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf o.GetIsolate())) {
935 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'."); 1002 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'.");
936 exceptionState.throwIfNeeded(); 1003 exceptionState.throwIfNeeded();
937 return; 1004 return;
(...skipping 18 matching lines...) Expand all
956 1023
957 static void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 1024 static void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
958 { 1025 {
959 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1026 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
960 V8TestInterface::implementsCustomVoidMethodMethodCustom(info); 1027 V8TestInterface::implementsCustomVoidMethodMethodCustom(info);
961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1028 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
962 } 1029 }
963 1030
964 static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 1031 static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
965 { 1032 {
1033 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsS taticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1034 if (DOMWindow* window = impl->toDOMWindow()) {
1035 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1036 exceptionState.throwIfNeeded();
1037 return;
1038 }
1039 if (!window->document())
1040 return;
1041 }
966 TestInterfaceImplementation::implementsStaticVoidMethod(); 1042 TestInterfaceImplementation::implementsStaticVoidMethod();
967 } 1043 }
968 1044
969 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 1045 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
970 { 1046 {
971 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1047 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
972 TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethod(info ); 1048 TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethod(info );
973 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1049 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
974 } 1050 }
975 1051
976 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 1052 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
977 { 1053 {
1054 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implements2 VoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
978 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1055 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1056 if (DOMWindow* window = impl->toDOMWindow()) {
1057 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1058 exceptionState.throwIfNeeded();
1059 return;
1060 }
1061 if (!window->document())
1062 return;
1063 }
979 TestImplements2::implements2VoidMethod(*impl); 1064 TestImplements2::implements2VoidMethod(*impl);
980 } 1065 }
981 1066
982 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 1067 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
983 { 1068 {
984 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
985 TestInterfaceImplementationV8Internal::implements2VoidMethodMethod(info); 1070 TestInterfaceImplementationV8Internal::implements2VoidMethodMethod(info);
986 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
987 } 1072 }
988 1073
989 static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 1074 static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
990 { 1075 {
1076 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implements3 VoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
991 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1077 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1078 if (DOMWindow* window = impl->toDOMWindow()) {
1079 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1080 exceptionState.throwIfNeeded();
1081 return;
1082 }
1083 if (!window->document())
1084 return;
1085 }
992 TestImplements3Implementation::implements3VoidMethod(*impl); 1086 TestImplements3Implementation::implements3VoidMethod(*impl);
993 } 1087 }
994 1088
995 static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 1089 static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
996 { 1090 {
997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
998 TestInterfaceImplementationV8Internal::implements3VoidMethodMethod(info); 1092 TestInterfaceImplementationV8Internal::implements3VoidMethodMethod(info);
999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1093 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1000 } 1094 }
1001 1095
1002 static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 1096 static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
1003 { 1097 {
1098 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implements3 StaticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1099 if (DOMWindow* window = impl->toDOMWindow()) {
1100 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1101 exceptionState.throwIfNeeded();
1102 return;
1103 }
1104 if (!window->document())
1105 return;
1106 }
1004 TestImplements3Implementation::implements3StaticVoidMethod(); 1107 TestImplements3Implementation::implements3StaticVoidMethod();
1005 } 1108 }
1006 1109
1007 static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 1110 static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
1008 { 1111 {
1009 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1112 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1010 TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethod(inf o); 1113 TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethod(inf o);
1011 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1012 } 1115 }
1013 1116
1014 #if ENABLE(PARTIAL_CONDITION) 1117 #if ENABLE(PARTIAL_CONDITION)
1015 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 1118 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
1016 { 1119 {
1120 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid Method", "TestInterface", info.Holder(), info.GetIsolate());
1017 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1121 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1122 if (DOMWindow* window = impl->toDOMWindow()) {
1123 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1124 exceptionState.throwIfNeeded();
1125 return;
1126 }
1127 if (!window->document())
1128 return;
1129 }
1018 TestPartialInterface::partialVoidMethod(*impl); 1130 TestPartialInterface::partialVoidMethod(*impl);
1019 } 1131 }
1020 #endif // ENABLE(PARTIAL_CONDITION) 1132 #endif // ENABLE(PARTIAL_CONDITION)
1021 1133
1022 #if ENABLE(PARTIAL_CONDITION) 1134 #if ENABLE(PARTIAL_CONDITION)
1023 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 1135 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
1024 { 1136 {
1025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1026 TestInterfaceImplementationV8Internal::partialVoidMethodMethod(info); 1138 TestInterfaceImplementationV8Internal::partialVoidMethodMethod(info);
1027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1028 } 1140 }
1029 #endif // ENABLE(PARTIAL_CONDITION) 1141 #endif // ENABLE(PARTIAL_CONDITION)
1030 1142
1031 #if ENABLE(PARTIAL_CONDITION) 1143 #if ENABLE(PARTIAL_CONDITION)
1032 static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 1144 static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
1033 { 1145 {
1146 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialStat icVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1147 if (DOMWindow* window = impl->toDOMWindow()) {
1148 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1149 exceptionState.throwIfNeeded();
1150 return;
1151 }
1152 if (!window->document())
1153 return;
1154 }
1034 TestPartialInterface::partialStaticVoidMethod(); 1155 TestPartialInterface::partialStaticVoidMethod();
1035 } 1156 }
1036 #endif // ENABLE(PARTIAL_CONDITION) 1157 #endif // ENABLE(PARTIAL_CONDITION)
1037 1158
1038 #if ENABLE(PARTIAL_CONDITION) 1159 #if ENABLE(PARTIAL_CONDITION)
1039 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 1160 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
1040 { 1161 {
1041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1162 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1042 TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info); 1163 TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info);
1043 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1164 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1044 } 1165 }
1045 #endif // ENABLE(PARTIAL_CONDITION) 1166 #endif // ENABLE(PARTIAL_CONDITION)
1046 1167
1047 #if ENABLE(PARTIAL_CONDITION) 1168 #if ENABLE(PARTIAL_CONDITION)
1048 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 1169 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
1049 { 1170 {
1050 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); 1171 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate());
1051 if (UNLIKELY(info.Length() < 1)) { 1172 if (UNLIKELY(info.Length() < 1)) {
1052 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 1173 throwMinimumArityTypeError(exceptionState, 1, info.Length());
1053 return; 1174 return;
1054 } 1175 }
1055 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1176 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1177 if (DOMWindow* window = impl->toDOMWindow()) {
1178 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1179 exceptionState.throwIfNeeded();
1180 return;
1181 }
1182 if (!window->document())
1183 return;
1184 }
1056 int longArg; 1185 int longArg;
1057 { 1186 {
1058 v8::TryCatch block; 1187 v8::TryCatch block;
1059 V8RethrowTryCatchScope rethrow(block); 1188 V8RethrowTryCatchScope rethrow(block);
1060 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 1189 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
1061 } 1190 }
1062 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); 1191 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg);
1063 } 1192 }
1064 #endif // ENABLE(PARTIAL_CONDITION) 1193 #endif // ENABLE(PARTIAL_CONDITION)
1065 1194
1066 #if ENABLE(PARTIAL_CONDITION) 1195 #if ENABLE(PARTIAL_CONDITION)
1067 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1196 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1068 { 1197 {
1069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1070 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); 1199 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info);
1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1200 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1072 } 1201 }
1073 #endif // ENABLE(PARTIAL_CONDITION) 1202 #endif // ENABLE(PARTIAL_CONDITION)
1074 1203
1075 #if ENABLE(PARTIAL_CONDITION) 1204 #if ENABLE(PARTIAL_CONDITION)
1076 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1205 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1077 { 1206 {
1078 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1207 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1079 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1208 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1209 if (DOMWindow* window = impl->toDOMWindow()) {
1210 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1211 exceptionState.throwIfNeeded();
1212 return;
1213 }
1214 if (!window->document())
1215 return;
1216 }
1080 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 1217 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
1081 TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMeth od(scriptContext, *impl, exceptionState); 1218 TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMeth od(scriptContext, *impl, exceptionState);
1082 if (exceptionState.hadException()) { 1219 if (exceptionState.hadException()) {
1083 exceptionState.throwIfNeeded(); 1220 exceptionState.throwIfNeeded();
1084 return; 1221 return;
1085 } 1222 }
1086 } 1223 }
1087 #endif // ENABLE(PARTIAL_CONDITION) 1224 #endif // ENABLE(PARTIAL_CONDITION)
1088 1225
1089 #if ENABLE(PARTIAL_CONDITION) 1226 #if ENABLE(PARTIAL_CONDITION)
1090 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 1227 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
1091 { 1228 {
1092 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1093 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaises ExceptionVoidMethodMethod(info); 1230 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaises ExceptionVoidMethodMethod(info);
1094 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1095 } 1232 }
1096 #endif // ENABLE(PARTIAL_CONDITION) 1233 #endif // ENABLE(PARTIAL_CONDITION)
1097 1234
1098 #if ENABLE(PARTIAL_CONDITION) 1235 #if ENABLE(PARTIAL_CONDITION)
1099 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 1236 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
1100 { 1237 {
1238 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodPartialCallbackTypeArg", "TestInterface", info.Holder(), info.GetIsolate() );
1101 if (UNLIKELY(info.Length() < 1)) { 1239 if (UNLIKELY(info.Length() < 1)) {
1102 throwMinimumArityTypeErrorForMethod("partialVoidMethodPartialCallbackTyp eArg", "TestInterface", 1, info.Length(), info.GetIsolate()); 1240 throwMinimumArityTypeError(exceptionState, 1, info.Length());
1103 return; 1241 return;
1104 } 1242 }
1105 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1243 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1244 if (DOMWindow* window = impl->toDOMWindow()) {
1245 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1246 exceptionState.throwIfNeeded();
1247 return;
1248 }
1249 if (!window->document())
1250 return;
1251 }
1106 ScriptValue partialCallbackTypeArg; 1252 ScriptValue partialCallbackTypeArg;
1107 { 1253 {
1108 v8::TryCatch block; 1254 v8::TryCatch block;
1109 V8RethrowTryCatchScope rethrow(block); 1255 V8RethrowTryCatchScope rethrow(block);
1110 TONATIVE_VOID_INTERNAL(partialCallbackTypeArg, ScriptValue(ScriptState:: current(info.GetIsolate()), info[0])); 1256 TONATIVE_VOID_INTERNAL(partialCallbackTypeArg, ScriptValue(ScriptState:: current(info.GetIsolate()), info[0]));
1111 } 1257 }
1112 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial CallbackTypeArg); 1258 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial CallbackTypeArg);
1113 } 1259 }
1114 #endif // ENABLE(PARTIAL_CONDITION) 1260 #endif // ENABLE(PARTIAL_CONDITION)
1115 1261
1116 #if ENABLE(PARTIAL_CONDITION) 1262 #if ENABLE(PARTIAL_CONDITION)
1117 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 1263 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
1118 { 1264 {
1119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1265 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1120 TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeA rgMethod(info); 1266 TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeA rgMethod(info);
1121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1267 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1122 } 1268 }
1123 #endif // ENABLE(PARTIAL_CONDITION) 1269 #endif // ENABLE(PARTIAL_CONDITION)
1124 1270
1125 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1271 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1126 { 1272 {
1273 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate());
1127 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1274 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1275 if (DOMWindow* window = impl->toDOMWindow()) {
1276 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1277 exceptionState.throwIfNeeded();
1278 return;
1279 }
1280 if (!window->document())
1281 return;
1282 }
1128 TestPartialInterfaceImplementation::partial2VoidMethod(*impl); 1283 TestPartialInterfaceImplementation::partial2VoidMethod(*impl);
1129 } 1284 }
1130 1285
1131 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 1286 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
1132 { 1287 {
1133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1288 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1134 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); 1289 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info);
1135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1290 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1136 } 1291 }
1137 1292
1138 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 1293 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
1139 { 1294 {
1295 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1296 if (DOMWindow* window = impl->toDOMWindow()) {
1297 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window ->frame(), exceptionState)) {
1298 exceptionState.throwIfNeeded();
1299 return;
1300 }
1301 if (!window->document())
1302 return;
1303 }
1140 TestPartialInterfaceImplementation::partial2StaticVoidMethod(); 1304 TestPartialInterfaceImplementation::partial2StaticVoidMethod();
1141 } 1305 }
1142 1306
1143 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1307 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1144 { 1308 {
1145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 1309 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
1146 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); 1310 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
1147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1148 } 1312 }
1149 1313
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 } 1675 }
1512 1676
1513 template<> 1677 template<>
1514 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle <v8::Object> creationContext, v8::Isolate* isolate) 1678 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle <v8::Object> creationContext, v8::Isolate* isolate)
1515 { 1679 {
1516 return toV8(impl, creationContext, isolate); 1680 return toV8(impl, creationContext, isolate);
1517 } 1681 }
1518 1682
1519 } // namespace WebCore 1683 } // namespace WebCore
1520 #endif // ENABLE(CONDITION) 1684 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698