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

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

Issue 19047003: Rebaseline bindings test results after r153938 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 */ 19 */
20 20
21 #include "config.h" 21 #include "config.h"
22 #if ENABLE(Condition1) || ENABLE(Condition2) 22 #if ENABLE(Condition1) || ENABLE(Condition2)
23 #include "V8TestInterface.h" 23 #include "V8TestInterface.h"
24 24
25 #include "RuntimeEnabledFeatures.h" 25 #include "RuntimeEnabledFeatures.h"
26 #include "V8Node.h" 26 #include "V8Node.h"
27 #include "V8NodeList.h" 27 #include "V8NodeList.h"
28 #include "V8TestObject.h" 28 #include "V8TestObject.h"
29 #include "bindings/bindings/tests/idls/TestPartialInterface.h" 29 #include "bindings/bindings/tests/idls/TestPartialInterface.h"
30 #include "bindings/v8/ExceptionState.h"
30 #include "bindings/v8/ScriptController.h" 31 #include "bindings/v8/ScriptController.h"
31 #include "bindings/v8/V8Binding.h" 32 #include "bindings/v8/V8Binding.h"
32 #include "bindings/v8/V8DOMConfiguration.h" 33 #include "bindings/v8/V8DOMConfiguration.h"
33 #include "bindings/v8/V8DOMWrapper.h" 34 #include "bindings/v8/V8DOMWrapper.h"
34 #include "bindings/v8/V8ObjectConstructor.h" 35 #include "bindings/v8/V8ObjectConstructor.h"
35 #include "core/dom/ContextFeatures.h" 36 #include "core/dom/ContextFeatures.h"
36 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
37 #include "core/dom/ExceptionCode.h"
38 #include "core/page/Frame.h" 38 #include "core/page/Frame.h"
39 #include "core/platform/chromium/TraceEvent.h" 39 #include "core/platform/chromium/TraceEvent.h"
40 #include "wtf/GetPtr.h" 40 #include "wtf/GetPtr.h"
41 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 #include "wtf/UnusedParam.h" 43 #include "wtf/UnusedParam.h"
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 static void initializeScriptWrappableForInterface(TestInterface* object) 47 static void initializeScriptWrappableForInterface(TestInterface* object)
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 761
762 #if ENABLE(Condition22) || ENABLE(Condition23) 762 #if ENABLE(Condition22) || ENABLE(Condition23)
763 763
764 static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 764 static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
765 { 765 {
766 if (args.Length() < 2) { 766 if (args.Length() < 2) {
767 throwNotEnoughArgumentsError(args.GetIsolate()); 767 throwNotEnoughArgumentsError(args.GetIsolate());
768 return; 768 return;
769 } 769 }
770 TestInterface* imp = V8TestInterface::toNative(args.Holder()); 770 TestInterface* imp = V8TestInterface::toNative(args.Holder());
771 ExceptionCode ec = 0; 771 ExceptionState es(args.GetIsolate());
772 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 772 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
773 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0); 773 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0);
774 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 774 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
775 RefPtr<TestObj> result = imp->implementsMethod2(scriptContext, strArg, objAr g, ec); 775 RefPtr<TestObj> result = imp->implementsMethod2(scriptContext, strArg, objAr g, es);
776 if (UNLIKELY(ec)) { 776 if (es.throwIfNeeded())
777 setDOMException(ec, args.GetIsolate());
778 return; 777 return;
779 }
780 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 778 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
781 return; 779 return;
782 } 780 }
783 781
784 #endif // ENABLE(Condition22) || ENABLE(Condition23) 782 #endif // ENABLE(Condition22) || ENABLE(Condition23)
785 783
786 #if ENABLE(Condition22) || ENABLE(Condition23) 784 #if ENABLE(Condition22) || ENABLE(Condition23)
787 785
788 static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 786 static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
789 { 787 {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 850
853 #if ENABLE(Condition11) || ENABLE(Condition12) 851 #if ENABLE(Condition11) || ENABLE(Condition12)
854 852
855 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args) 853 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
856 { 854 {
857 if (args.Length() < 2) { 855 if (args.Length() < 2) {
858 throwNotEnoughArgumentsError(args.GetIsolate()); 856 throwNotEnoughArgumentsError(args.GetIsolate());
859 return; 857 return;
860 } 858 }
861 TestInterface* imp = V8TestInterface::toNative(args.Holder()); 859 TestInterface* imp = V8TestInterface::toNative(args.Holder());
862 ExceptionCode ec = 0; 860 ExceptionState es(args.GetIsolate());
863 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 861 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
864 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0); 862 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0);
865 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 863 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
866 RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptCon text, imp, strArg, objArg, ec); 864 RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptCon text, imp, strArg, objArg, es);
867 if (UNLIKELY(ec)) { 865 if (es.throwIfNeeded())
868 setDOMException(ec, args.GetIsolate());
869 return; 866 return;
870 }
871 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 867 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
872 return; 868 return;
873 } 869 }
874 870
875 #endif // ENABLE(Condition11) || ENABLE(Condition12) 871 #endif // ENABLE(Condition11) || ENABLE(Condition12)
876 872
877 #if ENABLE(Condition11) || ENABLE(Condition12) 873 #if ENABLE(Condition11) || ENABLE(Condition12)
878 874
879 static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 875 static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
880 { 876 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 } 913 }
918 914
919 #endif // ENABLE(Condition11) || ENABLE(Condition12) 915 #endif // ENABLE(Condition11) || ENABLE(Condition12)
920 916
921 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) 917 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
922 { 918 {
923 if (args.Length() < 1) { 919 if (args.Length() < 1) {
924 throwNotEnoughArgumentsError(args.GetIsolate()); 920 throwNotEnoughArgumentsError(args.GetIsolate());
925 return; 921 return;
926 } 922 }
927 ExceptionCode ec = 0; 923 ExceptionState es(args.GetIsolate());
928 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); 924 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]);
929 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); 925 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]);
930 926
931 ScriptExecutionContext* context = getScriptExecutionContext(); 927 ScriptExecutionContext* context = getScriptExecutionContext();
932 928
933 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, ec); 929 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, es);
934 v8::Handle<v8::Object> wrapper = args.Holder(); 930 v8::Handle<v8::Object> wrapper = args.Holder();
935 if (ec) { 931 if (es.throwIfNeeded())
936 setDOMException(ec, args.GetIsolate());
937 return; 932 return;
938 }
939 933
940 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V 8TestInterface::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependen t); 934 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V 8TestInterface::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependen t);
941 args.GetReturnValue().Set(wrapper); 935 args.GetReturnValue().Set(wrapper);
942 } 936 }
943 937
944 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info) 938 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info)
945 { 939 {
946 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 940 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
947 return; 941 return;
948 if (info.Holder()->HasRealNamedCallbackProperty(name)) 942 if (info.Holder()->HasRealNamedCallbackProperty(name))
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 974
981 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8 ::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) 975 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8 ::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
982 { 976 {
983 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 977 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
984 V8TestInterface::namedPropertySetterCustom(name, value, info); 978 V8TestInterface::namedPropertySetterCustom(name, value, info);
985 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 979 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
986 } 980 }
987 981
988 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 982 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
989 { 983 {
990 ExceptionCode ec = 0; 984 ExceptionState es(info.GetIsolate());
991 TestInterface* collection = V8TestInterface::toNative(info.Holder()); 985 TestInterface* collection = V8TestInterface::toNative(info.Holder());
992 Vector<String> names; 986 Vector<String> names;
993 collection->namedPropertyEnumerator(names, ec); 987 collection->namedPropertyEnumerator(names, es);
994 if (ec) { 988 if (es.throwIfNeeded())
995 setDOMException(ec, info.GetIsolate());
996 return; 989 return;
997 }
998 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); 990 v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
999 for (size_t i = 0; i < names.size(); ++i) 991 for (size_t i = 0; i < names.size(); ++i)
1000 v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate())); 992 v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
1001 v8SetReturnValue(info, v8names); 993 v8SetReturnValue(info, v8names);
1002 } 994 }
1003 995
1004 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal lbackInfo<v8::Integer>& info) 996 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal lbackInfo<v8::Integer>& info)
1005 { 997 {
1006 TestInterface* collection = V8TestInterface::toNative(info.Holder()); 998 TestInterface* collection = V8TestInterface::toNative(info.Holder());
1007 AtomicString propertyName = toWebCoreAtomicString(name); 999 AtomicString propertyName = toWebCoreAtomicString(name);
1008 ExceptionCode ec = 0; 1000 ExceptionState es(info.GetIsolate());
1009 bool result = collection->namedPropertyQuery(propertyName, ec); 1001 bool result = collection->namedPropertyQuery(propertyName, es);
1010 if (ec) { 1002 if (es.throwIfNeeded())
1011 setDOMException(ec, info.GetIsolate());
1012 return; 1003 return;
1013 }
1014 if (!result) 1004 if (!result)
1015 return; 1005 return;
1016 v8SetReturnValueInt(info, v8::None); 1006 v8SetReturnValueInt(info, v8::None);
1017 } 1007 }
1018 1008
1019 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info) 1009 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
1020 { 1010 {
1021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 1011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
1022 TestInterfaceV8Internal::namedPropertyEnumerator(info); 1012 TestInterfaceV8Internal::namedPropertyEnumerator(info);
1023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 return wrapper; 1285 return wrapper;
1296 } 1286 }
1297 void V8TestInterface::derefObject(void* object) 1287 void V8TestInterface::derefObject(void* object)
1298 { 1288 {
1299 fromInternalPointer(object)->deref(); 1289 fromInternalPointer(object)->deref();
1300 } 1290 }
1301 1291
1302 } // namespace WebCore 1292 } // namespace WebCore
1303 1293
1304 #endif // ENABLE(Condition1) || ENABLE(Condition2) 1294 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestEventTarget.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698