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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp

Issue 2430223006: Bindings: Rebaseline run-bindings-tests results (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 // clang-format off 7 // clang-format off
8 #include "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 impl->voidMethodArrayOfLongsArg(); 147 impl->voidMethodArrayOfLongsArg();
148 return; 148 return;
149 } 149 }
150 arrayOfLongsArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), ex ceptionState); 150 arrayOfLongsArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), ex ceptionState);
151 if (exceptionState.hadException()) 151 if (exceptionState.hadException())
152 return; 152 return;
153 153
154 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); 154 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg);
155 } 155 }
156 156
157 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 157 void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
158 { 158 {
159 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); 159 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info);
160 } 160 }
161 161
162 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 162 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
163 { 163 {
164 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "voidMethodFloatArgStringArg"); 164 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "voidMethodFloatArgStringArg");
165 165
166 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 166 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
167 167
168 if (UNLIKELY(info.Length() < 2)) { 168 if (UNLIKELY(info.Length() < 2)) {
169 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 169 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
170 return; 170 return;
171 } 171 }
172 172
173 float floatArg; 173 float floatArg;
174 V8StringResource<> stringArg; 174 V8StringResource<> stringArg;
175 floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState); 175 floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState);
176 if (exceptionState.hadException()) 176 if (exceptionState.hadException())
177 return; 177 return;
178 178
179 stringArg = info[1]; 179 stringArg = info[1];
180 if (!stringArg.prepare()) 180 if (!stringArg.prepare())
181 return; 181 return;
182 182
183 impl->voidMethodFloatArgStringArg(floatArg, stringArg); 183 impl->voidMethodFloatArgStringArg(floatArg, stringArg);
184 } 184 }
185 185
186 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 186 void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
187 { 187 {
188 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); 188 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info);
189 } 189 }
190 190
191 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 191 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
192 { 192 {
193 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 193 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
194 194
195 if (UNLIKELY(info.Length() < 1)) { 195 if (UNLIKELY(info.Length() < 1)) {
196 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", Excepti onMessages::notEnoughArguments(1, info.Length()))); 196 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", Excepti onMessages::notEnoughArguments(1, info.Length())));
197 return; 197 return;
198 } 198 }
199 199
200 TestCallbackInterface* testCallbackInterfaceTypeArg; 200 TestCallbackInterface* testCallbackInterfaceTypeArg;
201 if (info.Length() <= 0 || !info[0]->IsFunction()) { 201 if (info.Length() <= 0 || !info[0]->IsFunction()) {
202 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The ca llback provided as parameter 1 is not a function.")); 202 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The ca llback provided as parameter 1 is not a function."));
203 203
204 return; 204 return;
205 } 205 }
206 testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Local<v8: :Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); 206 testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Local<v8: :Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
207 207
208 impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg); 208 impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg);
209 } 209 }
210 210
211 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 211 void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
212 { 212 {
213 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info); 213 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info);
214 } 214 }
215 215
216 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun ctionCallbackInfo<v8::Value>& info) 216 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun ctionCallbackInfo<v8::Value>& info)
217 { 217 {
218 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "uLongLongMethodTestInterfaceEmptyTypeSequenceArg"); 218 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "uLongLongMethodTestInterfaceEmptyTypeSequenceArg");
219 219
220 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 220 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
221 221
222 if (UNLIKELY(info.Length() < 1)) { 222 if (UNLIKELY(info.Length() < 1)) {
223 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 223 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
224 return; 224 return;
225 } 225 }
226 226
227 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyTypeSequenceArg; 227 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyTypeSequenceArg;
228 testInterfaceEmptyTypeSequenceArg = (toMemberNativeArray<TestInterfaceEmpty> (info[0], 1, info.GetIsolate(), exceptionState)); 228 testInterfaceEmptyTypeSequenceArg = (toMemberNativeArray<TestInterfaceEmpty> (info[0], 1, info.GetIsolate(), exceptionState));
229 if (exceptionState.hadException()) 229 if (exceptionState.hadException())
230 return; 230 return;
231 231
232 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); 232 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg)));
233 } 233 }
234 234
235 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 235 void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
236 { 236 {
237 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info); 237 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info);
238 } 238 }
239 239
240 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info) 240 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
241 { 241 {
242 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 242 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
243 243
244 TestInterfaceOrTestInterfaceEmpty result; 244 TestInterfaceOrTestInterfaceEmpty result;
245 impl->testInterfaceOrTestInterfaceEmptyMethod(result); 245 impl->testInterfaceOrTestInterfaceEmptyMethod(result);
246 v8SetReturnValue(info, result); 246 v8SetReturnValue(info, result);
247 } 247 }
248 248
249 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 249 void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
250 { 250 {
251 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); 251 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info);
252 } 252 }
253 253
254 static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 254 static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
255 { 255 {
256 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 256 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
257 257
258 StringOrDouble result; 258 StringOrDouble result;
259 impl->domStringOrDoubleMethod(result); 259 impl->domStringOrDoubleMethod(result);
260 v8SetReturnValue(info, result); 260 v8SetReturnValue(info, result);
261 } 261 }
262 262
263 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 263 void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
264 { 264 {
265 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info); 265 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info);
266 } 266 }
267 267
268 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 268 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
269 { 269 {
270 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "arrayOfStringsMethodArrayOfStringsArg"); 270 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "arrayOfStringsMethodArrayOfStringsArg");
271 271
272 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 272 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
273 273
274 if (UNLIKELY(info.Length() < 1)) { 274 if (UNLIKELY(info.Length() < 1)) {
275 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 275 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
276 return; 276 return;
277 } 277 }
278 278
279 Vector<String> arrayOfStringsArg; 279 Vector<String> arrayOfStringsArg;
280 arrayOfStringsArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate( ), exceptionState); 280 arrayOfStringsArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate( ), exceptionState);
281 if (exceptionState.hadException()) 281 if (exceptionState.hadException())
282 return; 282 return;
283 283
284 v8SetReturnValue(info, toV8(impl->arrayOfStringsMethodArrayOfStringsArg(arra yOfStringsArg), info.Holder(), info.GetIsolate())); 284 v8SetReturnValue(info, toV8(impl->arrayOfStringsMethodArrayOfStringsArg(arra yOfStringsArg), info.Holder(), info.GetIsolate()));
285 } 285 }
286 286
287 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 287 void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
288 { 288 {
289 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); 289 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info);
290 } 290 }
291 291
292 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 292 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
293 { 293 {
294 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "stringArrayMethodStringArrayArg"); 294 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestTypedefs", "stringArrayMethodStringArrayArg");
295 295
296 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 296 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
297 297
298 if (UNLIKELY(info.Length() < 1)) { 298 if (UNLIKELY(info.Length() < 1)) {
299 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 299 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
300 return; 300 return;
301 } 301 }
302 302
303 Vector<String> stringArrayArg; 303 Vector<String> stringArrayArg;
304 stringArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); 304 stringArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState);
305 if (exceptionState.hadException()) 305 if (exceptionState.hadException())
306 return; 306 return;
307 307
308 v8SetReturnValue(info, toV8(impl->stringArrayMethodStringArrayArg(stringArra yArg), info.Holder(), info.GetIsolate())); 308 v8SetReturnValue(info, toV8(impl->stringArrayMethodStringArrayArg(stringArra yArg), info.Holder(), info.GetIsolate()));
309 } 309 }
310 310
311 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 311 void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
312 { 312 {
313 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); 313 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info);
314 } 314 }
315 315
316 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 316 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
317 { 317 {
318 if (UNLIKELY(info.Length() < 1)) { 318 if (UNLIKELY(info.Length() < 1)) {
319 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToConstruct("TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.L ength()))); 319 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToConstruct("TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.L ength())));
320 return; 320 return;
321 } 321 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 { 409 {
410 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 410 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
411 } 411 }
412 412
413 TestTypedefs* V8TestTypedefs::toImplWithTypeCheck(v8::Isolate* isolate, v8::Loca l<v8::Value> value) 413 TestTypedefs* V8TestTypedefs::toImplWithTypeCheck(v8::Isolate* isolate, v8::Loca l<v8::Value> value)
414 { 414 {
415 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr; 415 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr;
416 } 416 }
417 417
418 } // namespace blink 418 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698