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

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

Issue 38063003: Improve TypeError messages from failed array conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve TypeError messages from failed array conversions. Created 7 years, 1 month 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
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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info) 1117 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info)
1118 { 1118 {
1119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1120 TestObjectPythonV8Internal::stringArrayAttributeAttributeGetter(name, info); 1120 TestObjectPythonV8Internal::stringArrayAttributeAttributeGetter(name, info);
1121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1122 } 1122 }
1123 1123
1124 static void stringArrayAttributeAttributeSetter(v8::Local<v8::String> name, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1124 static void stringArrayAttributeAttributeSetter(v8::Local<v8::String> name, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1125 { 1125 {
1126 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1126 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1127 V8TRYCATCH_VOID(Vector<String>, cppValue, toNativeArray<String>(jsValue, inf o.GetIsolate())); 1127 V8TRYCATCH_VOID(Vector<String>, cppValue, toNativeArray<String>(jsValue, 0, info.GetIsolate()));
1128 imp->setStringArrayAttribute(cppValue); 1128 imp->setStringArrayAttribute(cppValue);
1129 } 1129 }
1130 1130
1131 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1131 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1132 { 1132 {
1133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1134 TestObjectPythonV8Internal::stringArrayAttributeAttributeSetter(name, jsValu e, info); 1134 TestObjectPythonV8Internal::stringArrayAttributeAttributeSetter(name, jsValu e, info);
1135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1136 } 1136 }
1137 1137
1138 static void testInterfaceEmptyArrayAttributeAttributeGetter(v8::Local<v8::String > name, const v8::PropertyCallbackInfo<v8::Value>& info) 1138 static void testInterfaceEmptyArrayAttributeAttributeGetter(v8::Local<v8::String > name, const v8::PropertyCallbackInfo<v8::Value>& info)
1139 { 1139 {
1140 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1140 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1141 v8SetReturnValue(info, v8Array(imp->testInterfaceEmptyArrayAttribute(), info .GetIsolate())); 1141 v8SetReturnValue(info, v8Array(imp->testInterfaceEmptyArrayAttribute(), info .GetIsolate()));
1142 } 1142 }
1143 1143
1144 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8 ::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1144 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8 ::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1145 { 1145 {
1146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1147 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter( name, info); 1147 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter( name, info);
1148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1149 } 1149 }
1150 1150
1151 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::String > name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 1151 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::String > name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
1152 { 1152 {
1153 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1153 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1154 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNati veArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(jsValue, info.GetIsolate()))); 1154 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNati veArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(jsValue, 0, info.GetIsolate()) ));
1155 imp->setTestInterfaceEmptyArrayAttribute(cppValue); 1155 imp->setTestInterfaceEmptyArrayAttribute(cppValue);
1156 } 1156 }
1157 1157
1158 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8 ::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 1158 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8 ::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
1159 { 1159 {
1160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1161 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter( name, jsValue, info); 1161 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter( name, jsValue, info);
1162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1163 } 1163 }
1164 1164
1165 static void floatArrayAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1165 static void floatArrayAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1166 { 1166 {
1167 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1167 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1168 v8SetReturnValue(info, v8Array(imp->floatArrayAttribute(), info.GetIsolate() )); 1168 v8SetReturnValue(info, v8Array(imp->floatArrayAttribute(), info.GetIsolate() ));
1169 } 1169 }
1170 1170
1171 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String> nam e, const v8::PropertyCallbackInfo<v8::Value>& info) 1171 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String> nam e, const v8::PropertyCallbackInfo<v8::Value>& info)
1172 { 1172 {
1173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1174 TestObjectPythonV8Internal::floatArrayAttributeAttributeGetter(name, info); 1174 TestObjectPythonV8Internal::floatArrayAttributeAttributeGetter(name, info);
1175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1176 } 1176 }
1177 1177
1178 static void floatArrayAttributeAttributeSetter(v8::Local<v8::String> name, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1178 static void floatArrayAttributeAttributeSetter(v8::Local<v8::String> name, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1179 { 1179 {
1180 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1180 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1181 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, info. GetIsolate())); 1181 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in fo.GetIsolate()));
1182 imp->setFloatArrayAttribute(cppValue); 1182 imp->setFloatArrayAttribute(cppValue);
1183 } 1183 }
1184 1184
1185 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String> nam e, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1185 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String> nam e, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1186 { 1186 {
1187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1188 TestObjectPythonV8Internal::floatArrayAttributeAttributeSetter(name, jsValue , info); 1188 TestObjectPythonV8Internal::floatArrayAttributeAttributeSetter(name, jsValue , info);
1189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1190 } 1190 }
1191 1191
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3466 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent); 3466 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent);
3467 return wrapper; 3467 return wrapper;
3468 } 3468 }
3469 3469
3470 void V8TestObjectPython::derefObject(void* object) 3470 void V8TestObjectPython::derefObject(void* object)
3471 { 3471 {
3472 fromInternalPointer(object)->deref(); 3472 fromInternalPointer(object)->deref();
3473 } 3473 }
3474 3474
3475 } // namespace WebCore 3475 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestTypedefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698