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

Side by Side Diff: Source/bindings/tests/results/V8TestObject.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,
(...skipping 21 matching lines...) Expand all
32 #include "V8SVGPoint.h" 32 #include "V8SVGPoint.h"
33 #include "V8TestCallback.h" 33 #include "V8TestCallback.h"
34 #include "V8TestInterface.h" 34 #include "V8TestInterface.h"
35 #include "V8TestNode.h" 35 #include "V8TestNode.h"
36 #include "V8TestObjectectA.h" 36 #include "V8TestObjectectA.h"
37 #include "V8TestObjectectB.h" 37 #include "V8TestObjectectB.h"
38 #include "V8TestObjectectC.h" 38 #include "V8TestObjectectC.h"
39 #include "V8TestSubObj.h" 39 #include "V8TestSubObj.h"
40 #include "bindings/v8/BindingSecurity.h" 40 #include "bindings/v8/BindingSecurity.h"
41 #include "bindings/v8/Dictionary.h" 41 #include "bindings/v8/Dictionary.h"
42 #include "bindings/v8/ExceptionState.h"
42 #include "bindings/v8/ScriptController.h" 43 #include "bindings/v8/ScriptController.h"
43 #include "bindings/v8/ScriptValue.h" 44 #include "bindings/v8/ScriptValue.h"
44 #include "bindings/v8/SerializedScriptValue.h" 45 #include "bindings/v8/SerializedScriptValue.h"
45 #include "bindings/v8/V8Binding.h" 46 #include "bindings/v8/V8Binding.h"
46 #include "bindings/v8/V8DOMActivityLogger.h" 47 #include "bindings/v8/V8DOMActivityLogger.h"
47 #include "bindings/v8/V8DOMConfiguration.h" 48 #include "bindings/v8/V8DOMConfiguration.h"
48 #include "bindings/v8/V8DOMWrapper.h" 49 #include "bindings/v8/V8DOMWrapper.h"
49 #include "bindings/v8/V8EventListenerList.h" 50 #include "bindings/v8/V8EventListenerList.h"
50 #include "bindings/v8/V8HiddenPropertyName.h" 51 #include "bindings/v8/V8HiddenPropertyName.h"
51 #include "bindings/v8/V8ObjectConstructor.h" 52 #include "bindings/v8/V8ObjectConstructor.h"
52 #include "core/dom/ContextFeatures.h" 53 #include "core/dom/ContextFeatures.h"
53 #include "core/dom/CustomElementCallbackDispatcher.h" 54 #include "core/dom/CustomElementCallbackDispatcher.h"
54 #include "core/dom/Document.h" 55 #include "core/dom/Document.h"
55 #include "core/dom/ExceptionCode.h"
56 #include "core/page/DOMWindow.h" 56 #include "core/page/DOMWindow.h"
57 #include "core/page/Frame.h" 57 #include "core/page/Frame.h"
58 #include "core/page/PageConsole.h" 58 #include "core/page/PageConsole.h"
59 #include "core/page/UseCounter.h" 59 #include "core/page/UseCounter.h"
60 #include "core/platform/chromium/TraceEvent.h" 60 #include "core/platform/chromium/TraceEvent.h"
61 #include "core/svg/properties/SVGPropertyTearOff.h" 61 #include "core/svg/properties/SVGPropertyTearOff.h"
62 #include "core/svg/properties/SVGStaticPropertyTearOff.h" 62 #include "core/svg/properties/SVGStaticPropertyTearOff.h"
63 #include "wtf/GetPtr.h" 63 #include "wtf/GetPtr.h"
64 #include "wtf/RefCounted.h" 64 #include "wtf/RefCounted.h"
65 #include "wtf/RefPtr.h" 65 #include "wtf/RefPtr.h"
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 854 static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc al<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
855 { 855 {
856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
857 TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info); 857 TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info);
858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
859 } 859 }
860 860
861 static void attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 861 static void attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
862 { 862 {
863 TestObj* imp = V8TestObject::toNative(info.Holder()); 863 TestObj* imp = V8TestObject::toNative(info.Holder());
864 ExceptionCode ec = 0; 864 ExceptionState es(info.GetIsolate());
865 int v = imp->attrWithGetterException(ec); 865 int v = imp->attrWithGetterException(es);
866 if (UNLIKELY(ec)) { 866 if (UNLIKELY(es.throwIfNeeded()))
867 setDOMException(ec, info.GetIsolate());
868 return; 867 return;
869 };
870 v8SetReturnValueInt(info, v); 868 v8SetReturnValueInt(info, v);
871 return; 869 return;
872 } 870 }
873 871
874 static void attrWithGetterExceptionAttrGetterCallback(v8::Local<v8::String> name , const v8::PropertyCallbackInfo<v8::Value>& info) 872 static void attrWithGetterExceptionAttrGetterCallback(v8::Local<v8::String> name , const v8::PropertyCallbackInfo<v8::Value>& info)
875 { 873 {
876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
877 TestObjV8Internal::attrWithGetterExceptionAttrGetter(name, info); 875 TestObjV8Internal::attrWithGetterExceptionAttrGetter(name, info);
878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
879 } 877 }
(...skipping 24 matching lines...) Expand all
904 { 902 {
905 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 903 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
906 TestObjV8Internal::attrWithSetterExceptionAttrGetter(name, info); 904 TestObjV8Internal::attrWithSetterExceptionAttrGetter(name, info);
907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 905 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
908 } 906 }
909 907
910 static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 908 static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo cal<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
911 { 909 {
912 TestObj* imp = V8TestObject::toNative(info.Holder()); 910 TestObj* imp = V8TestObject::toNative(info.Holder());
913 V8TRYCATCH_VOID(int, v, toInt32(value)); 911 V8TRYCATCH_VOID(int, v, toInt32(value));
914 ExceptionCode ec = 0; 912 ExceptionState es(info.GetIsolate());
915 imp->setAttrWithSetterException(v, ec); 913 imp->setAttrWithSetterException(v, es);
916 if (UNLIKELY(ec)) 914 es.throwIfNeeded();
917 setDOMException(ec, info.GetIsolate());
918 return; 915 return;
919 } 916 }
920 917
921 static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name , v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 918 static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name , v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
922 { 919 {
923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 920 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
924 TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info); 921 TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info);
925 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 922 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
926 } 923 }
927 924
928 static void stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 925 static void stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
929 { 926 {
930 TestObj* imp = V8TestObject::toNative(info.Holder()); 927 TestObj* imp = V8TestObject::toNative(info.Holder());
931 ExceptionCode ec = 0; 928 ExceptionState es(info.GetIsolate());
932 String v = imp->stringAttrWithGetterException(ec); 929 String v = imp->stringAttrWithGetterException(es);
933 if (UNLIKELY(ec)) { 930 if (UNLIKELY(es.throwIfNeeded()))
934 setDOMException(ec, info.GetIsolate());
935 return; 931 return;
936 };
937 v8SetReturnValueString(info, v, info.GetIsolate(), NullStringAsEmpty); 932 v8SetReturnValueString(info, v, info.GetIsolate(), NullStringAsEmpty);
938 return; 933 return;
939 } 934 }
940 935
941 static void stringAttrWithGetterExceptionAttrGetterCallback(v8::Local<v8::String > name, const v8::PropertyCallbackInfo<v8::Value>& info) 936 static void stringAttrWithGetterExceptionAttrGetterCallback(v8::Local<v8::String > name, const v8::PropertyCallbackInfo<v8::Value>& info)
942 { 937 {
943 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
944 TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info); 939 TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info);
945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
946 } 941 }
(...skipping 24 matching lines...) Expand all
971 { 966 {
972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 967 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
973 TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info); 968 TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info);
974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 969 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
975 } 970 }
976 971
977 static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 972 static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
978 { 973 {
979 TestObj* imp = V8TestObject::toNative(info.Holder()); 974 TestObj* imp = V8TestObject::toNative(info.Holder());
980 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); 975 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
981 ExceptionCode ec = 0; 976 ExceptionState es(info.GetIsolate());
982 imp->setStringAttrWithSetterException(v, ec); 977 imp->setStringAttrWithSetterException(v, es);
983 if (UNLIKELY(ec)) 978 es.throwIfNeeded();
984 setDOMException(ec, info.GetIsolate());
985 return; 979 return;
986 } 980 }
987 981
988 static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String > name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 982 static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String > name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
989 { 983 {
990 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 984 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
991 TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info ); 985 TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info );
992 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 986 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
993 } 987 }
994 988
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 static void withActiveWindowAndFirstWindowAttributeAttrSetterCallback(v8::Local< v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<voi d>& info) 1095 static void withActiveWindowAndFirstWindowAttributeAttrSetterCallback(v8::Local< v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<voi d>& info)
1102 { 1096 {
1103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1097 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1104 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrSetter(name, v alue, info); 1098 TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrSetter(name, v alue, info);
1105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1099 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1106 } 1100 }
1107 1101
1108 static void withScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1102 static void withScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1109 { 1103 {
1110 TestObj* imp = V8TestObject::toNative(info.Holder()); 1104 TestObj* imp = V8TestObject::toNative(info.Holder());
1111 ExceptionCode ec = 0; 1105 ExceptionState es(info.GetIsolate());
1112 ScriptState* currentState = ScriptState::current(); 1106 ScriptState* currentState = ScriptState::current();
1113 if (!currentState) 1107 if (!currentState)
1114 return v8Undefined(); 1108 return v8Undefined();
1115 ScriptState& state = *currentState; 1109 ScriptState& state = *currentState;
1116 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, ec); 1110 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, es);
1117 if (UNLIKELY(ec)) { 1111 if (UNLIKELY(es.throwIfNeeded()))
1118 setDOMException(ec, info.GetIsolate());
1119 return; 1112 return;
1120 };
1121 if (state.hadException()) { 1113 if (state.hadException()) {
1122 throwError(state.exception(), info.GetIsolate()); 1114 throwError(state.exception(), info.GetIsolate());
1123 return; 1115 return;
1124 } 1116 }
1125 v8SetReturnValue(info, toV8Fast(v.release(), info, imp)); 1117 v8SetReturnValue(info, toV8Fast(v.release(), info, imp));
1126 return; 1118 return;
1127 } 1119 }
1128 1120
1129 static void withScriptStateAttributeRaisesAttrGetterCallback(v8::Local<v8::Strin g> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1121 static void withScriptStateAttributeRaisesAttrGetterCallback(v8::Local<v8::Strin g> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1130 { 1122 {
(...skipping 19 matching lines...) Expand all
1150 static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::Strin g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 1142 static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::Strin g> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1151 { 1143 {
1152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1153 TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, inf o); 1145 TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, inf o);
1154 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1155 } 1147 }
1156 1148
1157 static void withScriptExecutionContextAttributeRaisesAttrGetter(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1149 static void withScriptExecutionContextAttributeRaisesAttrGetter(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1158 { 1150 {
1159 TestObj* imp = V8TestObject::toNative(info.Holder()); 1151 TestObj* imp = V8TestObject::toNative(info.Holder());
1160 ExceptionCode ec = 0; 1152 ExceptionState es(info.GetIsolate());
1161 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 1153 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
1162 RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptCon text, ec); 1154 RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptCon text, es);
1163 if (UNLIKELY(ec)) { 1155 if (UNLIKELY(es.throwIfNeeded()))
1164 setDOMException(ec, info.GetIsolate());
1165 return; 1156 return;
1166 };
1167 v8SetReturnValue(info, toV8Fast(v.release(), info, imp)); 1157 v8SetReturnValue(info, toV8Fast(v.release(), info, imp));
1168 return; 1158 return;
1169 } 1159 }
1170 1160
1171 static void withScriptExecutionContextAttributeRaisesAttrGetterCallback(v8::Loca l<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1161 static void withScriptExecutionContextAttributeRaisesAttrGetterCallback(v8::Loca l<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1172 { 1162 {
1173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1174 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter(name, info); 1164 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter(name, info);
1175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1176 } 1166 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback( v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallba ckInfo<void>& info) 1218 static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback( v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallba ckInfo<void>& info)
1229 { 1219 {
1230 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1231 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSett er(name, value, info); 1221 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSett er(name, value, info);
1232 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1233 } 1223 }
1234 1224
1235 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(v8 ::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1225 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(v8 ::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1236 { 1226 {
1237 TestObj* imp = V8TestObject::toNative(info.Holder()); 1227 TestObj* imp = V8TestObject::toNative(info.Holder());
1238 ExceptionCode ec = 0; 1228 ExceptionState es(info.GetIsolate());
1239 ScriptState* currentState = ScriptState::current(); 1229 ScriptState* currentState = ScriptState::current();
1240 if (!currentState) 1230 if (!currentState)
1241 return v8Undefined(); 1231 return v8Undefined();
1242 ScriptState& state = *currentState; 1232 ScriptState& state = *currentState;
1243 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 1233 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
1244 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRa ises(&state, scriptContext, ec); 1234 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRa ises(&state, scriptContext, es);
1245 if (UNLIKELY(ec)) { 1235 if (UNLIKELY(es.throwIfNeeded()))
1246 setDOMException(ec, info.GetIsolate());
1247 return; 1236 return;
1248 };
1249 if (state.hadException()) { 1237 if (state.hadException()) {
1250 throwError(state.exception(), info.GetIsolate()); 1238 throwError(state.exception(), info.GetIsolate());
1251 return; 1239 return;
1252 } 1240 }
1253 v8SetReturnValue(info, toV8Fast(v.release(), info, imp)); 1241 v8SetReturnValue(info, toV8Fast(v.release(), info, imp));
1254 return; 1242 return;
1255 } 1243 }
1256 1244
1257 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCal lback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& inf o) 1245 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCal lback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& inf o)
1258 { 1246 {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 static void nullableLongSettableAttributeAttrSetterCallback(v8::Local<v8::String > name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 2226 static void nullableLongSettableAttributeAttrSetterCallback(v8::Local<v8::String > name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
2239 { 2227 {
2240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2241 TestObjV8Internal::nullableLongSettableAttributeAttrSetter(name, value, info ); 2229 TestObjV8Internal::nullableLongSettableAttributeAttrSetter(name, value, info );
2242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2243 } 2231 }
2244 2232
2245 static void nullableStringValueAttrGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 2233 static void nullableStringValueAttrGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
2246 { 2234 {
2247 TestObj* imp = V8TestObject::toNative(info.Holder()); 2235 TestObj* imp = V8TestObject::toNative(info.Holder());
2248 ExceptionCode ec = 0; 2236 ExceptionState es(info.GetIsolate());
2249 bool isNull = false; 2237 bool isNull = false;
2250 int v = imp->nullableStringValue(isNull, ec); 2238 int v = imp->nullableStringValue(isNull, es);
2251 if (isNull) { 2239 if (isNull) {
2252 v8SetReturnValueNull(info); 2240 v8SetReturnValueNull(info);
2253 return; 2241 return;
2254 } 2242 }
2255 if (UNLIKELY(ec)) { 2243 if (UNLIKELY(es.throwIfNeeded()))
2256 setDOMException(ec, info.GetIsolate());
2257 return; 2244 return;
2258 };
2259 v8SetReturnValueInt(info, v); 2245 v8SetReturnValueInt(info, v);
2260 return; 2246 return;
2261 } 2247 }
2262 2248
2263 static void nullableStringValueAttrGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info) 2249 static void nullableStringValueAttrGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info)
2264 { 2250 {
2265 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2251 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2266 TestObjV8Internal::nullableStringValueAttrGetter(name, info); 2252 TestObjV8Internal::nullableStringValueAttrGetter(name, info);
2267 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2253 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2268 } 2254 }
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3162 } 3148 }
3163 3149
3164 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI nfo<v8::Value>& args) 3150 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI nfo<v8::Value>& args)
3165 { 3151 {
3166 if (args.Length() < 2) { 3152 if (args.Length() < 2) {
3167 throwNotEnoughArgumentsError(args.GetIsolate()); 3153 throwNotEnoughArgumentsError(args.GetIsolate());
3168 return; 3154 return;
3169 } 3155 }
3170 TestObj* imp = V8TestObject::toNative(args.Holder()); 3156 TestObj* imp = V8TestObject::toNative(args.Holder());
3171 ExceptionCode ec = 0; 3157 ExceptionState es(args.GetIsolate());
3172 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 3158 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
3173 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0); 3159 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0);
3174 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj Arg, ec); 3160 RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, obj Arg, es);
3175 if (UNLIKELY(ec)) { 3161 if (es.throwIfNeeded())
3176 setDOMException(ec, args.GetIsolate());
3177 return; 3162 return;
3178 }
3179 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 3163 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
3180 return; 3164 return;
3181 } 3165 }
3182 3166
3183 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& args) 3167 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& args)
3184 { 3168 {
3185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3169 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3186 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args); 3170 TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args);
3187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3171 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3188 } 3172 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
3235 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& args) 3219 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& args)
3236 { 3220 {
3237 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3221 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3238 TestObjV8Internal::optionsObjectMethod(args); 3222 TestObjV8Internal::optionsObjectMethod(args);
3239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3223 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3240 } 3224 }
3241 3225
3242 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 3226 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
3243 { 3227 {
3244 TestObj* imp = V8TestObject::toNative(args.Holder()); 3228 TestObj* imp = V8TestObject::toNative(args.Holder());
3245 ExceptionCode ec = 0; 3229 ExceptionState es(args.GetIsolate());
3246 imp->methodWithException(ec); 3230 imp->methodWithException(es);
3247 if (UNLIKELY(ec)) { 3231 if (es.throwIfNeeded())
3248 setDOMException(ec, args.GetIsolate());
3249 return; 3232 return;
3250 }
3251 3233
3252 return; 3234 return;
3253 } 3235 }
3254 3236
3255 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 3237 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
3256 { 3238 {
3257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3239 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3258 TestObjV8Internal::methodWithExceptionMethod(args); 3240 TestObjV8Internal::methodWithExceptionMethod(args);
3259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3241 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3260 } 3242 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3374 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 3356 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
3375 { 3357 {
3376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3377 TestObjV8Internal::withScriptStateObjMethod(args); 3359 TestObjV8Internal::withScriptStateObjMethod(args);
3378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3379 } 3361 }
3380 3362
3381 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3363 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& args)
3382 { 3364 {
3383 TestObj* imp = V8TestObject::toNative(args.Holder()); 3365 TestObj* imp = V8TestObject::toNative(args.Holder());
3384 ExceptionCode ec = 0; 3366 ExceptionState es(args.GetIsolate());
3385 ScriptState* currentState = ScriptState::current(); 3367 ScriptState* currentState = ScriptState::current();
3386 if (!currentState) 3368 if (!currentState)
3387 return; 3369 return;
3388 ScriptState& state = *currentState; 3370 ScriptState& state = *currentState;
3389 imp->withScriptStateVoidException(&state, ec); 3371 imp->withScriptStateVoidException(&state, es);
3390 if (UNLIKELY(ec)) { 3372 if (es.throwIfNeeded())
3391 setDOMException(ec, args.GetIsolate());
3392 return; 3373 return;
3393 }
3394 if (state.hadException()) { 3374 if (state.hadException()) {
3395 v8::Local<v8::Value> exception = state.exception(); 3375 v8::Local<v8::Value> exception = state.exception();
3396 state.clearException(); 3376 state.clearException();
3397 throwError(exception, args.GetIsolate()); 3377 throwError(exception, args.GetIsolate());
3398 return; 3378 return;
3399 } 3379 }
3400 3380
3401 return; 3381 return;
3402 } 3382 }
3403 3383
3404 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args) 3384 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args)
3405 { 3385 {
3406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3407 TestObjV8Internal::withScriptStateVoidExceptionMethod(args); 3387 TestObjV8Internal::withScriptStateVoidExceptionMethod(args);
3408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3409 } 3389 }
3410 3390
3411 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8: :Value>& args) 3391 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8: :Value>& args)
3412 { 3392 {
3413 TestObj* imp = V8TestObject::toNative(args.Holder()); 3393 TestObj* imp = V8TestObject::toNative(args.Holder());
3414 ExceptionCode ec = 0; 3394 ExceptionState es(args.GetIsolate());
3415 ScriptState* currentState = ScriptState::current(); 3395 ScriptState* currentState = ScriptState::current();
3416 if (!currentState) 3396 if (!currentState)
3417 return; 3397 return;
3418 ScriptState& state = *currentState; 3398 ScriptState& state = *currentState;
3419 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec); 3399 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, es);
3420 if (UNLIKELY(ec)) { 3400 if (es.throwIfNeeded())
3421 setDOMException(ec, args.GetIsolate());
3422 return; 3401 return;
3423 }
3424 if (state.hadException()) { 3402 if (state.hadException()) {
3425 v8::Local<v8::Value> exception = state.exception(); 3403 v8::Local<v8::Value> exception = state.exception();
3426 state.clearException(); 3404 state.clearException();
3427 throwError(exception, args.GetIsolate()); 3405 throwError(exception, args.GetIsolate());
3428 return; 3406 return;
3429 } 3407 }
3430 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 3408 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
3431 return; 3409 return;
3432 } 3410 }
3433 3411
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3476 static void withScriptExecutionContextAndScriptStateMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& args) 3454 static void withScriptExecutionContextAndScriptStateMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& args)
3477 { 3455 {
3478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3479 TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(args); 3457 TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(args);
3480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3481 } 3459 }
3482 3460
3483 static void withScriptExecutionContextAndScriptStateObjExceptionMethod(const v8: :FunctionCallbackInfo<v8::Value>& args) 3461 static void withScriptExecutionContextAndScriptStateObjExceptionMethod(const v8: :FunctionCallbackInfo<v8::Value>& args)
3484 { 3462 {
3485 TestObj* imp = V8TestObject::toNative(args.Holder()); 3463 TestObj* imp = V8TestObject::toNative(args.Holder());
3486 ExceptionCode ec = 0; 3464 ExceptionState es(args.GetIsolate());
3487 ScriptState* currentState = ScriptState::current(); 3465 ScriptState* currentState = ScriptState::current();
3488 if (!currentState) 3466 if (!currentState)
3489 return; 3467 return;
3490 ScriptState& state = *currentState; 3468 ScriptState& state = *currentState;
3491 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 3469 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
3492 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc eption(&state, scriptContext, ec); 3470 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc eption(&state, scriptContext, es);
3493 if (UNLIKELY(ec)) { 3471 if (es.throwIfNeeded())
3494 setDOMException(ec, args.GetIsolate());
3495 return; 3472 return;
3496 }
3497 if (state.hadException()) { 3473 if (state.hadException()) {
3498 v8::Local<v8::Value> exception = state.exception(); 3474 v8::Local<v8::Value> exception = state.exception();
3499 state.clearException(); 3475 state.clearException();
3500 throwError(exception, args.GetIsolate()); 3476 throwError(exception, args.GetIsolate());
3501 return; 3477 return;
3502 } 3478 }
3503 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 3479 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
3504 return; 3480 return;
3505 } 3481 }
3506 3482
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4443 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4468 } 4444 }
4469 4445
4470 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 4446 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
4471 { 4447 {
4472 if (args.Length() < 1) { 4448 if (args.Length() < 1) {
4473 throwNotEnoughArgumentsError(args.GetIsolate()); 4449 throwNotEnoughArgumentsError(args.GetIsolate());
4474 return; 4450 return;
4475 } 4451 }
4476 TestObj* imp = V8TestObject::toNative(args.Holder()); 4452 TestObj* imp = V8TestObject::toNative(args.Holder());
4477 ExceptionCode ec = 0; 4453 ExceptionState es(args.GetIsolate());
4478 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0])); 4454 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0]));
4479 Vector<String> result = imp->stringArrayFunction(values, ec); 4455 Vector<String> result = imp->stringArrayFunction(values, es);
4480 if (UNLIKELY(ec)) { 4456 if (es.throwIfNeeded())
4481 setDOMException(ec, args.GetIsolate());
4482 return; 4457 return;
4483 }
4484 v8SetReturnValue(args, v8Array(result, args.GetIsolate())); 4458 v8SetReturnValue(args, v8Array(result, args.GetIsolate()));
4485 return; 4459 return;
4486 } 4460 }
4487 4461
4488 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 4462 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
4489 { 4463 {
4490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4491 TestObjV8Internal::stringArrayFunctionMethod(args); 4465 TestObjV8Internal::stringArrayFunctionMethod(args);
4492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4493 } 4467 }
4494 4468
4495 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value >& args) 4469 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value >& args)
4496 { 4470 {
4497 if (args.Length() < 1) { 4471 if (args.Length() < 1) {
4498 throwNotEnoughArgumentsError(args.GetIsolate()); 4472 throwNotEnoughArgumentsError(args.GetIsolate());
4499 return; 4473 return;
4500 } 4474 }
4501 TestObj* imp = V8TestObject::toNative(args.Holder()); 4475 TestObj* imp = V8TestObject::toNative(args.Holder());
4502 ExceptionCode ec = 0; 4476 ExceptionState es(args.GetIsolate());
4503 V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args .GetIsolate())); 4477 V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args .GetIsolate()));
4504 RefPtr<DOMStringList> result = imp->domStringListFunction(values, ec); 4478 RefPtr<DOMStringList> result = imp->domStringListFunction(values, es);
4505 if (UNLIKELY(ec)) { 4479 if (es.throwIfNeeded())
4506 setDOMException(ec, args.GetIsolate());
4507 return; 4480 return;
4508 }
4509 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 4481 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
4510 return; 4482 return;
4511 } 4483 }
4512 4484
4513 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args) 4485 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& args)
4514 { 4486 {
4515 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4487 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4516 TestObjV8Internal::domStringListFunctionMethod(args); 4488 TestObjV8Internal::domStringListFunctionMethod(args);
4517 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4489 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4518 } 4490 }
4519 4491
4520 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args ) 4492 static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args )
4521 { 4493 {
4522 TestObj* imp = V8TestObject::toNative(args.Holder()); 4494 TestObj* imp = V8TestObject::toNative(args.Holder());
4523 ExceptionCode ec = 0; 4495 ExceptionState es(args.GetIsolate());
4524 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(ec))) { 4496 if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(es))) {
4525 v8SetReturnValueNull(args); 4497 v8SetReturnValueNull(args);
4526 return; 4498 return;
4527 } 4499 }
4528 RefPtr<SVGDocument> result = imp->getSVGDocument(ec); 4500 RefPtr<SVGDocument> result = imp->getSVGDocument(es);
4529 if (UNLIKELY(ec)) { 4501 if (es.throwIfNeeded())
4530 setDOMException(ec, args.GetIsolate());
4531 return; 4502 return;
4532 }
4533 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ())); 4503 v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate ()));
4534 return; 4504 return;
4535 } 4505 }
4536 4506
4537 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4507 static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4538 { 4508 {
4539 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4509 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4540 TestObjV8Internal::getSVGDocumentMethod(args); 4510 TestObjV8Internal::getSVGDocumentMethod(args);
4541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4511 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4542 } 4512 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
4664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4634 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4665 } 4635 }
4666 4636
4667 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args ) 4637 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args )
4668 { 4638 {
4669 if (args.Length() < 3) { 4639 if (args.Length() < 3) {
4670 throwNotEnoughArgumentsError(args.GetIsolate()); 4640 throwNotEnoughArgumentsError(args.GetIsolate());
4671 return; 4641 return;
4672 } 4642 }
4673 TestObj* imp = V8TestObject::toNative(args.Holder()); 4643 TestObj* imp = V8TestObject::toNative(args.Holder());
4674 ExceptionCode ec = 0; 4644 ExceptionState es(args.GetIsolate());
4675 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]); 4645 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]);
4676 V8TRYCATCH_VOID(float, a, static_cast<float>(args[1]->NumberValue())); 4646 V8TRYCATCH_VOID(float, a, static_cast<float>(args[1]->NumberValue()));
4677 V8TRYCATCH_VOID(int, b, toInt32(args[2])); 4647 V8TRYCATCH_VOID(int, b, toInt32(args[2]));
4678 bool result = imp->strictFunction(str, a, b, ec); 4648 bool result = imp->strictFunction(str, a, b, es);
4679 if (UNLIKELY(ec)) { 4649 if (es.throwIfNeeded())
4680 setDOMException(ec, args.GetIsolate());
4681 return; 4650 return;
4682 }
4683 v8SetReturnValueBool(args, result); 4651 v8SetReturnValueBool(args, result);
4684 return; 4652 return;
4685 } 4653 }
4686 4654
4687 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args) 4655 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args)
4688 { 4656 {
4689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4690 TestObjV8Internal::strictFunctionMethod(args); 4658 TestObjV8Internal::strictFunctionMethod(args);
4691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4692 } 4660 }
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
5212 5180
5213 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info) 5181 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info)
5214 { 5182 {
5215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 5183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
5216 TestObjV8Internal::namedPropertyGetter(name, info); 5184 TestObjV8Internal::namedPropertyGetter(name, info);
5217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5218 } 5186 }
5219 5187
5220 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 5188 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
5221 { 5189 {
5222 ExceptionCode ec = 0; 5190 ExceptionState es(info.GetIsolate());
5223 TestObj* collection = V8TestObject::toNative(info.Holder()); 5191 TestObj* collection = V8TestObject::toNative(info.Holder());
5224 Vector<String> names; 5192 Vector<String> names;
5225 collection->namedPropertyEnumerator(names, ec); 5193 collection->namedPropertyEnumerator(names, es);
5226 if (ec) { 5194 if (es.throwIfNeeded())
5227 setDOMException(ec, info.GetIsolate());
5228 return; 5195 return;
5229 }
5230 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); 5196 v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
5231 for (size_t i = 0; i < names.size(); ++i) 5197 for (size_t i = 0; i < names.size(); ++i)
5232 v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate())); 5198 v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
5233 v8SetReturnValue(info, v8names); 5199 v8SetReturnValue(info, v8names);
5234 } 5200 }
5235 5201
5236 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal lbackInfo<v8::Integer>& info) 5202 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal lbackInfo<v8::Integer>& info)
5237 { 5203 {
5238 TestObj* collection = V8TestObject::toNative(info.Holder()); 5204 TestObj* collection = V8TestObject::toNative(info.Holder());
5239 AtomicString propertyName = toWebCoreAtomicString(name); 5205 AtomicString propertyName = toWebCoreAtomicString(name);
5240 ExceptionCode ec = 0; 5206 ExceptionState es(info.GetIsolate());
5241 bool result = collection->namedPropertyQuery(propertyName, ec); 5207 bool result = collection->namedPropertyQuery(propertyName, es);
5242 if (ec) { 5208 if (es.throwIfNeeded())
5243 setDOMException(ec, info.GetIsolate());
5244 return; 5209 return;
5245 }
5246 if (!result) 5210 if (!result)
5247 return; 5211 return;
5248 v8SetReturnValueInt(info, v8::None); 5212 v8SetReturnValueInt(info, v8::None);
5249 } 5213 }
5250 5214
5251 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info) 5215 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
5252 { 5216 {
5253 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 5217 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
5254 TestObjV8Internal::namedPropertyEnumerator(info); 5218 TestObjV8Internal::namedPropertyEnumerator(info);
5255 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5219 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
5761 installPerContextProperties(wrapper, impl.get(), isolate); 5725 installPerContextProperties(wrapper, impl.get(), isolate);
5762 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent); 5726 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
5763 return wrapper; 5727 return wrapper;
5764 } 5728 }
5765 void V8TestObject::derefObject(void* object) 5729 void V8TestObject::derefObject(void* object)
5766 { 5730 {
5767 fromInternalPointer(object)->deref(); 5731 fromInternalPointer(object)->deref();
5768 } 5732 }
5769 5733
5770 } // namespace WebCore 5734 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698