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

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

Issue 171533006: V8 Binding: Introduce toNativeWithTypeCheck (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 /* 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 540 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
541 { 541 {
542 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 542 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
543 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeGetter(info) ; 543 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeGetter(info) ;
544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
545 } 545 }
546 546
547 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info) 547 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info)
548 { 548 {
549 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 549 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
550 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::hasInst ance(jsValue, info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8: :Object>::Cast(jsValue)) : 0); 550 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativ eWithTypeCheck(info.GetIsolate(), jsValue));
551 imp->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); 551 imp->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue));
552 } 552 }
553 553
554 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 554 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
555 { 555 {
556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
557 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeSetter(jsVal ue, info); 557 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeSetter(jsVal ue, info);
558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
559 } 559 }
560 560
561 static void testObjectPythonAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 561 static void testObjectPythonAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
562 { 562 {
563 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 563 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
564 v8SetReturnValueFast(info, imp->testObjectPythonAttribute(), imp); 564 v8SetReturnValueFast(info, imp->testObjectPythonAttribute(), imp);
565 } 565 }
566 566
567 static void testObjectPythonAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 567 static void testObjectPythonAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
568 { 568 {
569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
570 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeGetter(info); 570 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeGetter(info);
571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
572 } 572 }
573 573
574 static void testObjectPythonAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 574 static void testObjectPythonAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
575 { 575 {
576 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 576 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
577 V8TRYCATCH_VOID(TestObjectPython*, cppValue, V8TestObjectPython::hasInstance (jsValue, info.GetIsolate()) ? V8TestObjectPython::toNative(v8::Handle<v8::Objec t>::Cast(jsValue)) : 0); 577 V8TRYCATCH_VOID(TestObjectPython*, cppValue, V8TestObjectPython::toNativeWit hTypeCheck(info.GetIsolate(), jsValue));
578 imp->setTestObjectPythonAttribute(WTF::getPtr(cppValue)); 578 imp->setTestObjectPythonAttribute(WTF::getPtr(cppValue));
579 } 579 }
580 580
581 static void testObjectPythonAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 581 static void testObjectPythonAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
582 { 582 {
583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
584 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeSetter(jsValue , info); 584 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeSetter(jsValue , info);
585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
586 } 586 }
587 587
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info) 895 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
896 { 896 {
897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
898 TestObjectPythonV8Internal::documentAttributeAttributeGetter(info); 898 TestObjectPythonV8Internal::documentAttributeAttributeGetter(info);
899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
900 } 900 }
901 901
902 static void documentAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 902 static void documentAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
903 { 903 {
904 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 904 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
905 V8TRYCATCH_VOID(Document*, cppValue, V8Document::hasInstance(jsValue, info.G etIsolate()) ? V8Document::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 905 V8TRYCATCH_VOID(Document*, cppValue, V8Document::toNativeWithTypeCheck(info. GetIsolate(), jsValue));
906 imp->setDocumentAttribute(WTF::getPtr(cppValue)); 906 imp->setDocumentAttribute(WTF::getPtr(cppValue));
907 } 907 }
908 908
909 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 909 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
910 { 910 {
911 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 911 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
912 TestObjectPythonV8Internal::documentAttributeAttributeSetter(jsValue, info); 912 TestObjectPythonV8Internal::documentAttributeAttributeSetter(jsValue, info);
913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
914 } 914 }
915 915
916 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 916 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
917 { 917 {
918 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 918 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
919 v8SetReturnValueFast(info, imp->documentFragmentAttribute(), imp); 919 v8SetReturnValueFast(info, imp->documentFragmentAttribute(), imp);
920 } 920 }
921 921
922 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 922 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
923 { 923 {
924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
925 TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetter(info); 925 TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetter(info);
926 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 926 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
927 } 927 }
928 928
929 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 929 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
930 { 930 {
931 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 931 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
932 V8TRYCATCH_VOID(DocumentFragment*, cppValue, V8DocumentFragment::hasInstance (jsValue, info.GetIsolate()) ? V8DocumentFragment::toNative(v8::Handle<v8::Objec t>::Cast(jsValue)) : 0); 932 V8TRYCATCH_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toNativeWit hTypeCheck(info.GetIsolate(), jsValue));
933 imp->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); 933 imp->setDocumentFragmentAttribute(WTF::getPtr(cppValue));
934 } 934 }
935 935
936 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 936 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
937 { 937 {
938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
939 TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetter(jsValue , info); 939 TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetter(jsValue , info);
940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
941 } 941 }
942 942
943 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 943 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
944 { 944 {
945 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 945 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
946 v8SetReturnValueFast(info, imp->documentTypeAttribute(), imp); 946 v8SetReturnValueFast(info, imp->documentTypeAttribute(), imp);
947 } 947 }
948 948
949 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 949 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
950 { 950 {
951 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 951 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
952 TestObjectPythonV8Internal::documentTypeAttributeAttributeGetter(info); 952 TestObjectPythonV8Internal::documentTypeAttributeAttributeGetter(info);
953 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 953 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
954 } 954 }
955 955
956 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 956 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
957 { 957 {
958 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 958 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
959 V8TRYCATCH_VOID(DocumentType*, cppValue, V8DocumentType::hasInstance(jsValue , info.GetIsolate()) ? V8DocumentType::toNative(v8::Handle<v8::Object>::Cast(jsV alue)) : 0); 959 V8TRYCATCH_VOID(DocumentType*, cppValue, V8DocumentType::toNativeWithTypeChe ck(info.GetIsolate(), jsValue));
960 imp->setDocumentTypeAttribute(WTF::getPtr(cppValue)); 960 imp->setDocumentTypeAttribute(WTF::getPtr(cppValue));
961 } 961 }
962 962
963 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 963 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
964 { 964 {
965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
966 TestObjectPythonV8Internal::documentTypeAttributeAttributeSetter(jsValue, in fo); 966 TestObjectPythonV8Internal::documentTypeAttributeAttributeSetter(jsValue, in fo);
967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
968 } 968 }
969 969
970 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 970 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
971 { 971 {
972 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 972 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
973 v8SetReturnValueFast(info, imp->elementAttribute(), imp); 973 v8SetReturnValueFast(info, imp->elementAttribute(), imp);
974 } 974 }
975 975
976 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 976 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
977 { 977 {
978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
979 TestObjectPythonV8Internal::elementAttributeAttributeGetter(info); 979 TestObjectPythonV8Internal::elementAttributeAttributeGetter(info);
980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
981 } 981 }
982 982
983 static void elementAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 983 static void elementAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
984 { 984 {
985 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 985 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
986 V8TRYCATCH_VOID(Element*, cppValue, V8Element::hasInstance(jsValue, info.Get Isolate()) ? V8Element::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 986 V8TRYCATCH_VOID(Element*, cppValue, V8Element::toNativeWithTypeCheck(info.Ge tIsolate(), jsValue));
987 imp->setElementAttribute(WTF::getPtr(cppValue)); 987 imp->setElementAttribute(WTF::getPtr(cppValue));
988 } 988 }
989 989
990 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 990 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
991 { 991 {
992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
993 TestObjectPythonV8Internal::elementAttributeAttributeSetter(jsValue, info); 993 TestObjectPythonV8Internal::elementAttributeAttributeSetter(jsValue, info);
994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
995 } 995 }
996 996
997 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info) 997 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info)
998 { 998 {
999 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 999 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1000 v8SetReturnValueFast(info, imp->nodeAttribute(), imp); 1000 v8SetReturnValueFast(info, imp->nodeAttribute(), imp);
1001 } 1001 }
1002 1002
1003 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info) 1003 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
1004 { 1004 {
1005 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1005 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1006 TestObjectPythonV8Internal::nodeAttributeAttributeGetter(info); 1006 TestObjectPythonV8Internal::nodeAttributeAttributeGetter(info);
1007 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1007 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1008 } 1008 }
1009 1009
1010 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8: :PropertyCallbackInfo<void>& info) 1010 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8: :PropertyCallbackInfo<void>& info)
1011 { 1011 {
1012 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1012 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1013 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 1013 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
1014 imp->setNodeAttribute(WTF::getPtr(cppValue)); 1014 imp->setNodeAttribute(WTF::getPtr(cppValue));
1015 } 1015 }
1016 1016
1017 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1017 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1018 { 1018 {
1019 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1019 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1020 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info); 1020 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info);
1021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1022 } 1022 }
1023 1023
1024 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info) 1024 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
1025 { 1025 {
1026 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1026 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1027 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp); 1027 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp);
1028 } 1028 }
1029 1029
1030 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 1030 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1031 { 1031 {
1032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1033 TestObjectPythonV8Internal::shadowRootAttributeAttributeGetter(info); 1033 TestObjectPythonV8Internal::shadowRootAttributeAttributeGetter(info);
1034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1035 } 1035 }
1036 1036
1037 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 1037 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
1038 { 1038 {
1039 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1039 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1040 V8TRYCATCH_VOID(ShadowRoot*, cppValue, V8ShadowRoot::hasInstance(jsValue, in fo.GetIsolate()) ? V8ShadowRoot::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 1040 V8TRYCATCH_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toNativeWithTypeCheck(i nfo.GetIsolate(), jsValue));
1041 imp->setShadowRootAttribute(WTF::getPtr(cppValue)); 1041 imp->setShadowRootAttribute(WTF::getPtr(cppValue));
1042 } 1042 }
1043 1043
1044 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1044 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1045 { 1045 {
1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1047 TestObjectPythonV8Internal::shadowRootAttributeAttributeSetter(jsValue, info ); 1047 TestObjectPythonV8Internal::shadowRootAttributeAttributeSetter(jsValue, info );
1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1049 } 1049 }
1050 1050
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 static void nullableTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1357 static void nullableTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1358 { 1358 {
1359 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1359 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1360 TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeGetter(in fo); 1360 TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeGetter(in fo);
1361 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1361 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1362 } 1362 }
1363 1363
1364 static void nullableTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info) 1364 static void nullableTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info)
1365 { 1365 {
1366 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1366 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1367 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsVal ue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast( jsValue)) : 0); 1367 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), jsValue));
1368 imp->setNullableTestInterfaceAttribute(WTF::getPtr(cppValue)); 1368 imp->setNullableTestInterfaceAttribute(WTF::getPtr(cppValue));
1369 } 1369 }
1370 1370
1371 static void nullableTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o) 1371 static void nullableTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o)
1372 { 1372 {
1373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1374 TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeSetter(js Value, info); 1374 TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeSetter(js Value, info);
1375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1376 } 1376 }
1377 1377
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 { 2766 {
2767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2768 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttrib uteGetter(info); 2768 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttrib uteGetter(info);
2769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 2769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2770 } 2770 }
2771 2771
2772 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2772 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2773 { 2773 {
2774 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio nTestInterfaceEmptyAttribute", "TestObjectPython", info.Holder(), info.GetIsolat e()); 2774 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio nTestInterfaceEmptyAttribute", "TestObjectPython", info.Holder(), info.GetIsolat e());
2775 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 2775 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2776 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::hasInst ance(jsValue, info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8: :Object>::Cast(jsValue)) : 0); 2776 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativ eWithTypeCheck(info.GetIsolate(), jsValue));
2777 imp->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), ex ceptionState); 2777 imp->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), ex ceptionState);
2778 exceptionState.throwIfNeeded(); 2778 exceptionState.throwIfNeeded();
2779 } 2779 }
2780 2780
2781 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf o<void>& info) 2781 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf o<void>& info)
2782 { 2782 {
2783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2784 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttrib uteSetter(jsValue, info); 2784 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttrib uteSetter(jsValue, info);
2785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 2785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2786 } 2786 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 2837 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2838 { 2838 {
2839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2840 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetter(inf o); 2840 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetter(inf o);
2841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 2841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2842 } 2842 }
2843 2843
2844 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 2844 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
2845 { 2845 {
2846 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 2846 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2847 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsVal ue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast( jsValue)) : 0); 2847 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), jsValue));
2848 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 2848 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2849 imp->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr( cppValue)); 2849 imp->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr( cppValue));
2850 } 2850 }
2851 2851
2852 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 2852 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
2853 { 2853 {
2854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2855 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 2855 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2856 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeSetter(jsV alue, info); 2856 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeSetter(jsV alue, info);
2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2858 } 2858 }
2859 2859
2860 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8:: PropertyCallbackInfo<v8::Value>& info) 2860 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8:: PropertyCallbackInfo<v8::Value>& info)
2861 { 2861 {
2862 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 2862 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2863 v8SetReturnValueFast(info, imp->fastGetAttribute(HTMLNames::reflectedNameAtt ributeAttr), imp); 2863 v8SetReturnValueFast(info, imp->fastGetAttribute(HTMLNames::reflectedNameAtt ributeAttr), imp);
2864 } 2864 }
2865 2865
2866 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8 ::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2866 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8 ::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2867 { 2867 {
2868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2869 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttrib uteGetter(info); 2869 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttrib uteGetter(info);
2870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 2870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2871 } 2871 }
2872 2872
2873 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2873 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local< v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2874 { 2874 {
2875 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 2875 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2876 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsVal ue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast( jsValue)) : 0); 2876 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), jsValue));
2877 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 2877 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2878 imp->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppValu e)); 2878 imp->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppValu e));
2879 } 2879 }
2880 2880
2881 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf o<void>& info) 2881 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf o<void>& info)
2882 { 2882 {
2883 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2883 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2884 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 2884 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2885 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttrib uteSetter(jsValue, info); 2885 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttrib uteSetter(jsValue, info);
2886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 2886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
3662 3662
3663 static void strictTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 3663 static void strictTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3664 { 3664 {
3665 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec kingTestInterfaceAttribute", "TestObjectPython", info.Holder(), info.GetIsolate( )); 3665 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec kingTestInterfaceAttribute", "TestObjectPython", info.Holder(), info.GetIsolate( ));
3666 if (!isUndefinedOrNull(jsValue) && !V8TestInterface::hasInstance(jsValue, in fo.GetIsolate())) { 3666 if (!isUndefinedOrNull(jsValue) && !V8TestInterface::hasInstance(jsValue, in fo.GetIsolate())) {
3667 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); 3667 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
3668 exceptionState.throwIfNeeded(); 3668 exceptionState.throwIfNeeded();
3669 return; 3669 return;
3670 } 3670 }
3671 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 3671 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3672 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsVal ue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast( jsValue)) : 0); 3672 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), jsValue));
3673 imp->setStrictTypeCheckingTestInterfaceAttribute(WTF::getPtr(cppValue)); 3673 imp->setStrictTypeCheckingTestInterfaceAttribute(WTF::getPtr(cppValue));
3674 } 3674 }
3675 3675
3676 static void strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 3676 static void strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
3677 { 3677 {
3678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 3678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3679 TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttribut eSetter(jsValue, info); 3679 TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttribut eSetter(jsValue, info);
3680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 3680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3681 } 3681 }
3682 3682
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3888 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info) 3888 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
3889 { 3889 {
3890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 3890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3891 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info ); 3891 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info );
3892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 3892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3893 } 3893 }
3894 3894
3895 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV alue, const v8::PropertyCallbackInfo<void>& info) 3895 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV alue, const v8::PropertyCallbackInfo<void>& info)
3896 { 3896 {
3897 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 3897 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3898 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfacePython::toNati ve(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 3898 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
3899 imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue)); 3899 imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
3900 } 3900 }
3901 3901
3902 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 3902 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3903 { 3903 {
3904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 3904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3905 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(jsVa lue, info); 3905 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(jsVa lue, info);
3906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 3906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3907 } 3907 }
3908 3908
(...skipping 12 matching lines...) Expand all
3921 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 3921 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3922 { 3922 {
3923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 3923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3924 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttr ibuteGetter(info); 3924 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttr ibuteGetter(info);
3925 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 3925 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3926 } 3926 }
3927 3927
3928 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 3928 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3929 { 3929 {
3930 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 3930 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3931 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::hasInstance(jsValue, info.GetIsolate()) ? V8TestInter faceWillBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0) ; 3931 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
3932 imp->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue)); 3932 imp->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue));
3933 } 3933 }
3934 3934
3935 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info) 3935 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info)
3936 { 3936 {
3937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 3937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3938 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttr ibuteSetter(jsValue, info); 3938 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttr ibuteSetter(jsValue, info);
3939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 3939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3940 } 3940 }
3941 3941
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
4429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4430 } 4430 }
4431 4431
4432 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 4432 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
4433 { 4433 {
4434 if (UNLIKELY(info.Length() < 1)) { 4434 if (UNLIKELY(info.Length() < 1)) {
4435 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.L ength())), info.GetIsolate()); 4435 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.L ength())), info.GetIsolate());
4436 return; 4436 return;
4437 } 4437 }
4438 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4438 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4439 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 4439 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
4440 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 4440 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
4441 } 4441 }
4442 4442
4443 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 4443 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
4444 { 4444 {
4445 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4445 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4446 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); 4446 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
4447 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4447 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4448 } 4448 }
4449 4449
4450 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 4450 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
4451 { 4451 {
4452 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate ()); 4452 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate ());
4453 if (UNLIKELY(info.Length() < 2)) { 4453 if (UNLIKELY(info.Length() < 2)) {
4454 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 4454 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4455 exceptionState.throwIfNeeded(); 4455 exceptionState.throwIfNeeded();
4456 return; 4456 return;
4457 } 4457 }
4458 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4458 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4459 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState); 4459 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4460 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[1])) : 0); 4460 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
4461 imp->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg); 4461 imp->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg);
4462 } 4462 }
4463 4463
4464 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 4464 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
4465 { 4465 {
4466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4467 TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(inf o); 4467 TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(inf o);
4468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4469 } 4469 }
4470 4470
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4629 } 4629 }
4630 4630
4631 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4631 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4632 { 4632 {
4633 if (UNLIKELY(info.Length() < 1)) { 4633 if (UNLIKELY(info.Length() < 1)) {
4634 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAttrArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 4634 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAttrArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
4635 return; 4635 return;
4636 } 4636 }
4637 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4637 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4638 V8TRYCATCH_VOID(Attr*, attrArg, V8Attr::hasInstance(info[0], info.GetIsolate ()) ? V8Attr::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4638 V8TRYCATCH_VOID(Attr*, attrArg, V8Attr::toNativeWithTypeCheck(info.GetIsolat e(), info[0]));
4639 imp->voidMethodAttrArg(attrArg); 4639 imp->voidMethodAttrArg(attrArg);
4640 } 4640 }
4641 4641
4642 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 4642 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4643 { 4643 {
4644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4645 TestObjectPythonV8Internal::voidMethodAttrArgMethod(info); 4645 TestObjectPythonV8Internal::voidMethodAttrArgMethod(info);
4646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4647 } 4647 }
4648 4648
4649 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 4649 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
4650 { 4650 {
4651 if (UNLIKELY(info.Length() < 1)) { 4651 if (UNLIKELY(info.Length() < 1)) {
4652 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentArg ", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 4652 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentArg ", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4653 return; 4653 return;
4654 } 4654 }
4655 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4655 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4656 V8TRYCATCH_VOID(Document*, documentArg, V8Document::hasInstance(info[0], inf o.GetIsolate()) ? V8Document::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4656 V8TRYCATCH_VOID(Document*, documentArg, V8Document::toNativeWithTypeCheck(in fo.GetIsolate(), info[0]));
4657 imp->voidMethodDocumentArg(documentArg); 4657 imp->voidMethodDocumentArg(documentArg);
4658 } 4658 }
4659 4659
4660 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4660 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4661 { 4661 {
4662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4663 TestObjectPythonV8Internal::voidMethodDocumentArgMethod(info); 4663 TestObjectPythonV8Internal::voidMethodDocumentArgMethod(info);
4664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4665 } 4665 }
4666 4666
4667 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 4667 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
4668 { 4668 {
4669 if (UNLIKELY(info.Length() < 1)) { 4669 if (UNLIKELY(info.Length() < 1)) {
4670 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentTyp eArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length( ))), info.GetIsolate()); 4670 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentTyp eArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length( ))), info.GetIsolate());
4671 return; 4671 return;
4672 } 4672 }
4673 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4673 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4674 V8TRYCATCH_VOID(DocumentType*, documentTypeArg, V8DocumentType::hasInstance( info[0], info.GetIsolate()) ? V8DocumentType::toNative(v8::Handle<v8::Object>::C ast(info[0])) : 0); 4674 V8TRYCATCH_VOID(DocumentType*, documentTypeArg, V8DocumentType::toNativeWith TypeCheck(info.GetIsolate(), info[0]));
4675 imp->voidMethodDocumentTypeArg(documentTypeArg); 4675 imp->voidMethodDocumentTypeArg(documentTypeArg);
4676 } 4676 }
4677 4677
4678 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 4678 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
4679 { 4679 {
4680 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4680 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4681 TestObjectPythonV8Internal::voidMethodDocumentTypeArgMethod(info); 4681 TestObjectPythonV8Internal::voidMethodDocumentTypeArgMethod(info);
4682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4683 } 4683 }
4684 4684
4685 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4685 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4686 { 4686 {
4687 if (UNLIKELY(info.Length() < 1)) { 4687 if (UNLIKELY(info.Length() < 1)) {
4688 throwTypeError(ExceptionMessages::failedToExecute("voidMethodElementArg" , "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 4688 throwTypeError(ExceptionMessages::failedToExecute("voidMethodElementArg" , "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4689 return; 4689 return;
4690 } 4690 }
4691 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4691 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4692 V8TRYCATCH_VOID(Element*, elementArg, V8Element::hasInstance(info[0], info.G etIsolate()) ? V8Element::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4692 V8TRYCATCH_VOID(Element*, elementArg, V8Element::toNativeWithTypeCheck(info. GetIsolate(), info[0]));
4693 imp->voidMethodElementArg(elementArg); 4693 imp->voidMethodElementArg(elementArg);
4694 } 4694 }
4695 4695
4696 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4696 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4697 { 4697 {
4698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4699 TestObjectPythonV8Internal::voidMethodElementArgMethod(info); 4699 TestObjectPythonV8Internal::voidMethodElementArgMethod(info);
4700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4701 } 4701 }
4702 4702
4703 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4703 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4704 { 4704 {
4705 if (UNLIKELY(info.Length() < 1)) { 4705 if (UNLIKELY(info.Length() < 1)) {
4706 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 4706 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
4707 return; 4707 return;
4708 } 4708 }
4709 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 4709 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4710 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::hasInstance(info[0], info.GetIsolate ()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4710 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::toNativeWithTypeCheck(info.GetIsolat e(), info[0]));
4711 imp->voidMethodNodeArg(nodeArg); 4711 imp->voidMethodNodeArg(nodeArg);
4712 } 4712 }
4713 4713
4714 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 4714 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4715 { 4715 {
4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4717 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info); 4717 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info);
4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4719 } 4719 }
4720 4720
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
5059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 5059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5060 } 5060 }
5061 5061
5062 static void voidMethodNullableStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 5062 static void voidMethodNullableStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
5063 { 5063 {
5064 if (UNLIKELY(info.Length() < 1)) { 5064 if (UNLIKELY(info.Length() < 1)) {
5065 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableStr ingArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Lengt h())), info.GetIsolate()); 5065 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableStr ingArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Lengt h())), info.GetIsolate());
5066 return; 5066 return;
5067 } 5067 }
5068 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5068 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5069 V8TRYCATCH_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestIn terfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::to Native(v8::Handle<v8::Object>::Cast(info[0])) : 0); 5069 V8TRYCATCH_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestIn terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5070 imp->voidMethodNullableStringArg(nullableTestInterfaceEmptyArg); 5070 imp->voidMethodNullableStringArg(nullableTestInterfaceEmptyArg);
5071 } 5071 }
5072 5072
5073 static void voidMethodNullableStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 5073 static void voidMethodNullableStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
5074 { 5074 {
5075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5076 TestObjectPythonV8Internal::voidMethodNullableStringArgMethod(info); 5076 TestObjectPythonV8Internal::voidMethodNullableStringArgMethod(info);
5077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 5077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5078 } 5078 }
5079 5079
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
5402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 5402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5403 } 5403 }
5404 5404
5405 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 5405 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
5406 { 5406 {
5407 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5407 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5408 if (UNLIKELY(info.Length() <= 0)) { 5408 if (UNLIKELY(info.Length() <= 0)) {
5409 imp->voidMethodOptionalTestInterfaceEmptyArg(); 5409 imp->voidMethodOptionalTestInterfaceEmptyArg();
5410 return; 5410 return;
5411 } 5411 }
5412 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestIn terfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::to Native(v8::Handle<v8::Object>::Cast(info[0])) : 0); 5412 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestIn terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5413 imp->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg); 5413 imp->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg);
5414 } 5414 }
5415 5415
5416 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 5416 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
5417 { 5417 {
5418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5419 TestObjectPythonV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(in fo); 5419 TestObjectPythonV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(in fo);
5420 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 5420 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5421 } 5421 }
5422 5422
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
5558 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5558 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5559 exceptionState.throwIfNeeded(); 5559 exceptionState.throwIfNeeded();
5560 return; 5560 return;
5561 } 5561 }
5562 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5562 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5563 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState); 5563 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
5564 if (UNLIKELY(info.Length() <= 1)) { 5564 if (UNLIKELY(info.Length() <= 1)) {
5565 imp->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); 5565 imp->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
5566 return; 5566 return;
5567 } 5567 }
5568 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter faceEmpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNat ive(v8::Handle<v8::Object>::Cast(info[1])) : 0); 5568 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter faceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
5569 imp->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestInt erfaceEmpty); 5569 imp->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestInt erfaceEmpty);
5570 } 5570 }
5571 5571
5572 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 5572 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
5573 { 5573 {
5574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5575 TestObjectPythonV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMe thod(info); 5575 TestObjectPythonV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMe thod(info);
5576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 5576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5577 } 5577 }
5578 5578
5579 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 5579 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
5580 { 5580 {
5581 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgOptionalLongArg", "TestObjectPython", info.Holder(), info.Ge tIsolate()); 5581 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgOptionalLongArg", "TestObjectPython", info.Holder(), info.Ge tIsolate());
5582 if (UNLIKELY(info.Length() < 1)) { 5582 if (UNLIKELY(info.Length() < 1)) {
5583 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5583 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5584 exceptionState.throwIfNeeded(); 5584 exceptionState.throwIfNeeded();
5585 return; 5585 return;
5586 } 5586 }
5587 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5587 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5588 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter faceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNat ive(v8::Handle<v8::Object>::Cast(info[0])) : 0); 5588 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter faceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5589 if (UNLIKELY(info.Length() <= 1)) { 5589 if (UNLIKELY(info.Length() <= 1)) {
5590 imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfac eEmpty); 5590 imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfac eEmpty);
5591 return; 5591 return;
5592 } 5592 }
5593 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState); 5593 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
5594 imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmp ty, longArg); 5594 imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmp ty, longArg);
5595 } 5595 }
5596 5596
5597 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 5597 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
5598 { 5598 {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
5673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 5673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5674 } 5674 }
5675 5675
5676 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info) 5676 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info)
5677 { 5677 {
5678 if (UNLIKELY(info.Length() < 1)) { 5678 if (UNLIKELY(info.Length() < 1)) {
5679 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages: :notEnoughArguments(1, info.Length())), info.GetIsolate()); 5679 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages: :notEnoughArguments(1, info.Length())), info.GetIsolate());
5680 return; 5680 return;
5681 } 5681 }
5682 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5682 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5683 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 5683 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5684 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; 5684 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
5685 for (int i = 1; i < info.Length(); ++i) { 5685 for (int i = 1; i < info.Length(); ++i) {
5686 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { 5686 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
5687 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt erfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", "parameter 2 i s not of type 'TestInterfaceEmpty'."), info.GetIsolate()); 5687 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt erfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", "parameter 2 i s not of type 'TestInterfaceEmpty'."), info.GetIsolate());
5688 return; 5688 return;
5689 } 5689 }
5690 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8: :Handle<v8::Object>::Cast(info[i]))); 5690 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8: :Handle<v8::Object>::Cast(info[i])));
5691 } 5691 }
5692 imp->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterf aceEmptyArg, variadicTestInterfaceEmptyArgs); 5692 imp->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterf aceEmptyArg, variadicTestInterfaceEmptyArgs);
5693 } 5693 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
5878 imp->overloadedMethodD(longArg); 5878 imp->overloadedMethodD(longArg);
5879 } 5879 }
5880 5880
5881 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 5881 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5882 { 5882 {
5883 if (UNLIKELY(info.Length() < 1)) { 5883 if (UNLIKELY(info.Length() < 1)) {
5884 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 5884 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
5885 return; 5885 return;
5886 } 5886 }
5887 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5887 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5888 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 5888 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5889 imp->overloadedMethodD(testInterfaceEmptyArg); 5889 imp->overloadedMethodD(testInterfaceEmptyArg);
5890 } 5890 }
5891 5891
5892 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5892 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5893 { 5893 {
5894 if (((info.Length() == 1))) { 5894 if (((info.Length() == 1))) {
5895 overloadedMethodD1Method(info); 5895 overloadedMethodD1Method(info);
5896 return; 5896 return;
5897 } 5897 }
5898 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())))) { 5898 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())))) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
5980 imp->overloadedMethodF(longArg); 5980 imp->overloadedMethodF(longArg);
5981 } 5981 }
5982 5982
5983 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 5983 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5984 { 5984 {
5985 if (UNLIKELY(info.Length() < 1)) { 5985 if (UNLIKELY(info.Length() < 1)) {
5986 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 5986 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
5987 return; 5987 return;
5988 } 5988 }
5989 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 5989 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5990 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestIn terfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::to Native(v8::Handle<v8::Object>::Cast(info[0])) : 0); 5990 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestIn terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5991 imp->overloadedMethodF(testInterfaceEmptyNullableArg); 5991 imp->overloadedMethodF(testInterfaceEmptyNullableArg);
5992 } 5992 }
5993 5993
5994 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5994 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5995 { 5995 {
5996 if (((info.Length() == 1))) { 5996 if (((info.Length() == 1))) {
5997 overloadedMethodF1Method(info); 5997 overloadedMethodF1Method(info);
5998 return; 5998 return;
5999 } 5999 }
6000 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::has Instance(info[0], info.GetIsolate())))) { 6000 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::has Instance(info[0], info.GetIsolate())))) {
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
6293 } 6293 }
6294 if (!window->document()) 6294 if (!window->document())
6295 return; 6295 return;
6296 } 6296 }
6297 if (UNLIKELY(info.Length() < 1)) { 6297 if (UNLIKELY(info.Length() < 1)) {
6298 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6298 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6299 exceptionState.throwIfNeeded(); 6299 exceptionState.throwIfNeeded();
6300 return; 6300 return;
6301 } 6301 }
6302 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 6302 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6303 V8TRYCATCH_VOID(Event*, event, V8Event::hasInstance(info[0], info.GetIsolate ()) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 6303 V8TRYCATCH_VOID(Event*, event, V8Event::toNativeWithTypeCheck(info.GetIsolat e(), info[0]));
6304 bool result = imp->dispatchEvent(event, exceptionState); 6304 bool result = imp->dispatchEvent(event, exceptionState);
6305 if (exceptionState.throwIfNeeded()) 6305 if (exceptionState.throwIfNeeded())
6306 return; 6306 return;
6307 v8SetReturnValueBool(info, result); 6307 v8SetReturnValueBool(info, result);
6308 } 6308 }
6309 6309
6310 static void dispatchEventMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 6310 static void dispatchEventMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
6311 { 6311 {
6312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 6312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6313 TestObjectPythonV8Internal::dispatchEventMethod(info); 6313 TestObjectPythonV8Internal::dispatchEventMethod(info);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
6356 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 6356 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6357 { 6357 {
6358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 6358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6359 TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethod(info); 6359 TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethod(info);
6360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 6360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6361 } 6361 }
6362 6362
6363 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 6363 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
6364 { 6364 {
6365 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 6365 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6366 V8TRYCATCH_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceE mpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 6366 V8TRYCATCH_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6367 imp->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInt erfaceEmptyArg); 6367 imp->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInt erfaceEmptyArg);
6368 } 6368 }
6369 6369
6370 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 6370 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6371 { 6371 {
6372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 6372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6373 TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgM ethod(info); 6373 TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgM ethod(info);
6374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 6374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6375 } 6375 }
6376 6376
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 6870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6871 } 6871 }
6872 6872
6873 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 6873 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
6874 { 6874 {
6875 if (UNLIKELY(info.Length() < 1)) { 6875 if (UNLIKELY(info.Length() < 1)) {
6876 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM ethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate()); 6876 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM ethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate());
6877 return; 6877 return;
6878 } 6878 }
6879 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 6879 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6880 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 6880 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6881 imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 6881 imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
6882 } 6882 }
6883 6883
6884 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 6884 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6885 { 6885 {
6886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 6886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6887 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgM ethod(info); 6887 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgM ethod(info);
6888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 6888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6889 } 6889 }
6890 6890
6891 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info) 6891 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info)
6892 { 6892 {
6893 if (UNLIKELY(info.Length() < 1)) { 6893 if (UNLIKELY(info.Length() < 1)) {
6894 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM ethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate()); 6894 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM ethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate());
6895 return; 6895 return;
6896 } 6896 }
6897 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 6897 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6898 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 6898 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6899 imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 6899 imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
6900 } 6900 }
6901 6901
6902 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain World(const v8::FunctionCallbackInfo<v8::Value>& info) 6902 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain World(const v8::FunctionCallbackInfo<v8::Value>& info)
6903 { 6903 {
6904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 6904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6905 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgM ethodForMainWorld(info); 6905 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgM ethodForMainWorld(info);
6906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 6906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6907 } 6907 }
6908 6908
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
7167 { 7167 {
7168 if (UNLIKELY(info.Length() < 1)) { 7168 if (UNLIKELY(info.Length() < 1)) {
7169 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughA rguments(1, info.Length())), info.GetIsolate()); 7169 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughA rguments(1, info.Length())), info.GetIsolate());
7170 return; 7170 return;
7171 } 7171 }
7172 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 7172 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7173 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) { 7173 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) {
7174 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type ' TestInterfaceEmpty'."), info.GetIsolate()); 7174 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type ' TestInterfaceEmpty'."), info.GetIsolate());
7175 return; 7175 return;
7176 } 7176 }
7177 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 7177 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7178 imp->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg ); 7178 imp->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg );
7179 } 7179 }
7180 7180
7181 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(cons t v8::FunctionCallbackInfo<v8::Value>& info) 7181 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(cons t v8::FunctionCallbackInfo<v8::Value>& info)
7182 { 7182 {
7183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 7183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7184 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyAr gMethod(info); 7184 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyAr gMethod(info);
7185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 7185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7186 } 7186 }
7187 7187
7188 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info) 7188 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info)
7189 { 7189 {
7190 if (UNLIKELY(info.Length() < 1)) { 7190 if (UNLIKELY(info.Length() < 1)) {
7191 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::no tEnoughArguments(1, info.Length())), info.GetIsolate()); 7191 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::no tEnoughArguments(1, info.Length())), info.GetIsolate());
7192 return; 7192 return;
7193 } 7193 }
7194 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 7194 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7195 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt y::hasInstance(info[0], info.GetIsolate())) { 7195 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt y::hasInstance(info[0], info.GetIsolate())) {
7196 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not o f type 'TestInterfaceEmpty'."), info.GetIsolate()); 7196 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not o f type 'TestInterfaceEmpty'."), info.GetIsolate());
7197 return; 7197 return;
7198 } 7198 }
7199 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 7199 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7200 imp->strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg(testInterface EmptyArg); 7200 imp->strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg(testInterface EmptyArg);
7201 } 7201 }
7202 7202
7203 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info) 7203 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info)
7204 { 7204 {
7205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 7205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7206 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodNullableTestInterfac eEmptyArgMethod(info); 7206 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodNullableTestInterfac eEmptyArgMethod(info);
7207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 7207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7208 } 7208 }
7209 7209
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
7658 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ)); 7658 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ));
7659 return handleScope.Escape(templ); 7659 return handleScope.Escape(templ);
7660 } 7660 }
7661 7661
7662 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) 7662 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
7663 { 7663 {
7664 return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeI nfo, jsValue) 7664 return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeI nfo, jsValue)
7665 || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTy peInfo, jsValue); 7665 || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTy peInfo, jsValue);
7666 } 7666 }
7667 7667
7668 TestObjectPython* V8TestObjectPython::toNativeWithTypeCheck(v8::Isolate* isolate , v8::Handle<v8::Value> value)
7669 {
7670 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
7671 }
7672
7668 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Objec t> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate) 7673 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Objec t> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate)
7669 { 7674 {
7670 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype()); 7675 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype());
7671 if (ContextFeatures::featureNameEnabled(impl->document())) { 7676 if (ContextFeatures::featureNameEnabled(impl->document())) {
7672 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 7677 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7673 {"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContex tEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perCon textEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */}; 7678 {"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContex tEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perCon textEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */};
7674 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 7679 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
7675 } 7680 }
7676 if (ContextFeatures::featureNameEnabled(impl->document())) { 7681 if (ContextFeatures::featureNameEnabled(impl->document())) {
7677 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 7682 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
7714 fromInternalPointer(object)->deref(); 7719 fromInternalPointer(object)->deref();
7715 } 7720 }
7716 7721
7717 template<> 7722 template<>
7718 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 7723 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
7719 { 7724 {
7720 return toV8(impl, creationContext, isolate); 7725 return toV8(impl, creationContext, isolate);
7721 } 7726 }
7722 7727
7723 } // namespace WebCore 7728 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.h ('k') | Source/bindings/tests/results/V8TestSVG.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698