OLD | NEW |
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 #include "V8TestObject.h" | 7 #include "V8TestObject.h" |
8 | 8 |
9 #include "bindings/core/v8/ArrayBufferOrArrayBufferViewOrDictionary.h" | 9 #include "bindings/core/v8/ArrayBufferOrArrayBufferViewOrDictionary.h" |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 { | 206 { |
207 TestObjectV8Internal::dateAttributeAttributeGetter(info); | 207 TestObjectV8Internal::dateAttributeAttributeGetter(info); |
208 } | 208 } |
209 | 209 |
210 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) | 210 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) |
211 { | 211 { |
212 v8::Local<v8::Object> holder = info.Holder(); | 212 v8::Local<v8::Object> holder = info.Holder(); |
213 ExceptionState exceptionState(ExceptionState::SetterContext, "dateAttribute"
, "TestObject", holder, info.GetIsolate()); | 213 ExceptionState exceptionState(ExceptionState::SetterContext, "dateAttribute"
, "TestObject", holder, info.GetIsolate()); |
214 TestObject* impl = V8TestObject::toImpl(holder); | 214 TestObject* impl = V8TestObject::toImpl(holder); |
215 double cppValue = toCoreDate(info.GetIsolate(), v8Value, exceptionState); | 215 double cppValue = toCoreDate(info.GetIsolate(), v8Value, exceptionState); |
216 if (exceptionState.throwIfNeeded()) | 216 if (exceptionState.hadException()) |
217 return; | 217 return; |
218 impl->setDateAttribute(cppValue); | 218 impl->setDateAttribute(cppValue); |
219 } | 219 } |
220 | 220 |
221 static void dateAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 221 static void dateAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
222 { | 222 { |
223 v8::Local<v8::Value> v8Value = info[0]; | 223 v8::Local<v8::Value> v8Value = info[0]; |
224 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); | 224 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); |
225 } | 225 } |
226 | 226 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 { | 263 { |
264 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); | 264 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); |
265 } | 265 } |
266 | 266 |
267 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 267 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
268 { | 268 { |
269 v8::Local<v8::Object> holder = info.Holder(); | 269 v8::Local<v8::Object> holder = info.Holder(); |
270 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); | 270 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); |
271 TestObject* impl = V8TestObject::toImpl(holder); | 271 TestObject* impl = V8TestObject::toImpl(holder); |
272 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); | 272 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); |
273 if (exceptionState.throwIfNeeded()) | 273 if (exceptionState.hadException()) |
274 return; | 274 return; |
275 impl->setByteStringAttribute(cppValue); | 275 impl->setByteStringAttribute(cppValue); |
276 } | 276 } |
277 | 277 |
278 static void byteStringAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 278 static void byteStringAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
279 { | 279 { |
280 v8::Local<v8::Value> v8Value = info[0]; | 280 v8::Local<v8::Value> v8Value = info[0]; |
281 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); | 281 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); |
282 } | 282 } |
283 | 283 |
284 static void usvStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 284 static void usvStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
285 { | 285 { |
286 v8::Local<v8::Object> holder = info.Holder(); | 286 v8::Local<v8::Object> holder = info.Holder(); |
287 TestObject* impl = V8TestObject::toImpl(holder); | 287 TestObject* impl = V8TestObject::toImpl(holder); |
288 v8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate()); | 288 v8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate()); |
289 } | 289 } |
290 | 290 |
291 static void usvStringAttributeAttributeGetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 291 static void usvStringAttributeAttributeGetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
292 { | 292 { |
293 TestObjectV8Internal::usvStringAttributeAttributeGetter(info); | 293 TestObjectV8Internal::usvStringAttributeAttributeGetter(info); |
294 } | 294 } |
295 | 295 |
296 static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 296 static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
297 { | 297 { |
298 v8::Local<v8::Object> holder = info.Holder(); | 298 v8::Local<v8::Object> holder = info.Holder(); |
299 ExceptionState exceptionState(ExceptionState::SetterContext, "usvStringAttri
bute", "TestObject", holder, info.GetIsolate()); | 299 ExceptionState exceptionState(ExceptionState::SetterContext, "usvStringAttri
bute", "TestObject", holder, info.GetIsolate()); |
300 TestObject* impl = V8TestObject::toImpl(holder); | 300 TestObject* impl = V8TestObject::toImpl(holder); |
301 V8StringResource<> cppValue = toUSVString(info.GetIsolate(), v8Value, except
ionState); | 301 V8StringResource<> cppValue = toUSVString(info.GetIsolate(), v8Value, except
ionState); |
302 if (exceptionState.throwIfNeeded()) | 302 if (exceptionState.hadException()) |
303 return; | 303 return; |
304 impl->setUsvStringAttribute(cppValue); | 304 impl->setUsvStringAttribute(cppValue); |
305 } | 305 } |
306 | 306 |
307 static void usvStringAttributeAttributeSetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 307 static void usvStringAttributeAttributeSetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
308 { | 308 { |
309 v8::Local<v8::Value> v8Value = info[0]; | 309 v8::Local<v8::Value> v8Value = info[0]; |
310 TestObjectV8Internal::usvStringAttributeAttributeSetter(v8Value, info); | 310 TestObjectV8Internal::usvStringAttributeAttributeSetter(v8Value, info); |
311 } | 311 } |
312 | 312 |
313 static void domTimeStampAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 313 static void domTimeStampAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
314 { | 314 { |
315 v8::Local<v8::Object> holder = info.Holder(); | 315 v8::Local<v8::Object> holder = info.Holder(); |
316 TestObject* impl = V8TestObject::toImpl(holder); | 316 TestObject* impl = V8TestObject::toImpl(holder); |
317 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); | 317 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); |
318 } | 318 } |
319 | 319 |
320 static void domTimeStampAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 320 static void domTimeStampAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
321 { | 321 { |
322 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); | 322 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); |
323 } | 323 } |
324 | 324 |
325 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 325 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
326 { | 326 { |
327 v8::Local<v8::Object> holder = info.Holder(); | 327 v8::Local<v8::Object> holder = info.Holder(); |
328 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); | 328 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); |
329 TestObject* impl = V8TestObject::toImpl(holder); | 329 TestObject* impl = V8TestObject::toImpl(holder); |
330 unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalCon
version, exceptionState); | 330 unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalCon
version, exceptionState); |
331 if (exceptionState.throwIfNeeded()) | 331 if (exceptionState.hadException()) |
332 return; | 332 return; |
333 impl->setDomTimeStampAttribute(cppValue); | 333 impl->setDomTimeStampAttribute(cppValue); |
334 } | 334 } |
335 | 335 |
336 static void domTimeStampAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 336 static void domTimeStampAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
337 { | 337 { |
338 v8::Local<v8::Value> v8Value = info[0]; | 338 v8::Local<v8::Value> v8Value = info[0]; |
339 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); | 339 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); |
340 } | 340 } |
341 | 341 |
342 static void booleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 342 static void booleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
343 { | 343 { |
344 v8::Local<v8::Object> holder = info.Holder(); | 344 v8::Local<v8::Object> holder = info.Holder(); |
345 TestObject* impl = V8TestObject::toImpl(holder); | 345 TestObject* impl = V8TestObject::toImpl(holder); |
346 v8SetReturnValueBool(info, impl->booleanAttribute()); | 346 v8SetReturnValueBool(info, impl->booleanAttribute()); |
347 } | 347 } |
348 | 348 |
349 static void booleanAttributeAttributeGetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 349 static void booleanAttributeAttributeGetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
350 { | 350 { |
351 TestObjectV8Internal::booleanAttributeAttributeGetter(info); | 351 TestObjectV8Internal::booleanAttributeAttributeGetter(info); |
352 } | 352 } |
353 | 353 |
354 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) | 354 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) |
355 { | 355 { |
356 v8::Local<v8::Object> holder = info.Holder(); | 356 v8::Local<v8::Object> holder = info.Holder(); |
357 ExceptionState exceptionState(ExceptionState::SetterContext, "booleanAttribu
te", "TestObject", holder, info.GetIsolate()); | 357 ExceptionState exceptionState(ExceptionState::SetterContext, "booleanAttribu
te", "TestObject", holder, info.GetIsolate()); |
358 TestObject* impl = V8TestObject::toImpl(holder); | 358 TestObject* impl = V8TestObject::toImpl(holder); |
359 bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); | 359 bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); |
360 if (exceptionState.throwIfNeeded()) | 360 if (exceptionState.hadException()) |
361 return; | 361 return; |
362 impl->setBooleanAttribute(cppValue); | 362 impl->setBooleanAttribute(cppValue); |
363 } | 363 } |
364 | 364 |
365 static void booleanAttributeAttributeSetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 365 static void booleanAttributeAttributeSetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
366 { | 366 { |
367 v8::Local<v8::Value> v8Value = info[0]; | 367 v8::Local<v8::Value> v8Value = info[0]; |
368 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); | 368 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); |
369 } | 369 } |
370 | 370 |
371 static void byteAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 371 static void byteAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
372 { | 372 { |
373 v8::Local<v8::Object> holder = info.Holder(); | 373 v8::Local<v8::Object> holder = info.Holder(); |
374 TestObject* impl = V8TestObject::toImpl(holder); | 374 TestObject* impl = V8TestObject::toImpl(holder); |
375 v8SetReturnValueInt(info, impl->byteAttribute()); | 375 v8SetReturnValueInt(info, impl->byteAttribute()); |
376 } | 376 } |
377 | 377 |
378 static void byteAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 378 static void byteAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
379 { | 379 { |
380 TestObjectV8Internal::byteAttributeAttributeGetter(info); | 380 TestObjectV8Internal::byteAttributeAttributeGetter(info); |
381 } | 381 } |
382 | 382 |
383 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) | 383 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) |
384 { | 384 { |
385 v8::Local<v8::Object> holder = info.Holder(); | 385 v8::Local<v8::Object> holder = info.Holder(); |
386 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); | 386 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); |
387 TestObject* impl = V8TestObject::toImpl(holder); | 387 TestObject* impl = V8TestObject::toImpl(holder); |
388 int cppValue = toInt8(info.GetIsolate(), v8Value, NormalConversion, exceptio
nState); | 388 int cppValue = toInt8(info.GetIsolate(), v8Value, NormalConversion, exceptio
nState); |
389 if (exceptionState.throwIfNeeded()) | 389 if (exceptionState.hadException()) |
390 return; | 390 return; |
391 impl->setByteAttribute(cppValue); | 391 impl->setByteAttribute(cppValue); |
392 } | 392 } |
393 | 393 |
394 static void byteAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 394 static void byteAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
395 { | 395 { |
396 v8::Local<v8::Value> v8Value = info[0]; | 396 v8::Local<v8::Value> v8Value = info[0]; |
397 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); | 397 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); |
398 } | 398 } |
399 | 399 |
400 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 400 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
401 { | 401 { |
402 v8::Local<v8::Object> holder = info.Holder(); | 402 v8::Local<v8::Object> holder = info.Holder(); |
403 TestObject* impl = V8TestObject::toImpl(holder); | 403 TestObject* impl = V8TestObject::toImpl(holder); |
404 v8SetReturnValue(info, impl->doubleAttribute()); | 404 v8SetReturnValue(info, impl->doubleAttribute()); |
405 } | 405 } |
406 | 406 |
407 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 407 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
408 { | 408 { |
409 TestObjectV8Internal::doubleAttributeAttributeGetter(info); | 409 TestObjectV8Internal::doubleAttributeAttributeGetter(info); |
410 } | 410 } |
411 | 411 |
412 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) | 412 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) |
413 { | 413 { |
414 v8::Local<v8::Object> holder = info.Holder(); | 414 v8::Local<v8::Object> holder = info.Holder(); |
415 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestObject", holder, info.GetIsolate()); | 415 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestObject", holder, info.GetIsolate()); |
416 TestObject* impl = V8TestObject::toImpl(holder); | 416 TestObject* impl = V8TestObject::toImpl(holder); |
417 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); | 417 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); |
418 if (exceptionState.throwIfNeeded()) | 418 if (exceptionState.hadException()) |
419 return; | 419 return; |
420 impl->setDoubleAttribute(cppValue); | 420 impl->setDoubleAttribute(cppValue); |
421 } | 421 } |
422 | 422 |
423 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 423 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
424 { | 424 { |
425 v8::Local<v8::Value> v8Value = info[0]; | 425 v8::Local<v8::Value> v8Value = info[0]; |
426 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); | 426 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); |
427 } | 427 } |
428 | 428 |
429 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 429 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
430 { | 430 { |
431 v8::Local<v8::Object> holder = info.Holder(); | 431 v8::Local<v8::Object> holder = info.Holder(); |
432 TestObject* impl = V8TestObject::toImpl(holder); | 432 TestObject* impl = V8TestObject::toImpl(holder); |
433 v8SetReturnValue(info, impl->floatAttribute()); | 433 v8SetReturnValue(info, impl->floatAttribute()); |
434 } | 434 } |
435 | 435 |
436 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 436 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
437 { | 437 { |
438 TestObjectV8Internal::floatAttributeAttributeGetter(info); | 438 TestObjectV8Internal::floatAttributeAttributeGetter(info); |
439 } | 439 } |
440 | 440 |
441 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 441 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) |
442 { | 442 { |
443 v8::Local<v8::Object> holder = info.Holder(); | 443 v8::Local<v8::Object> holder = info.Holder(); |
444 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestObject", holder, info.GetIsolate()); | 444 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestObject", holder, info.GetIsolate()); |
445 TestObject* impl = V8TestObject::toImpl(holder); | 445 TestObject* impl = V8TestObject::toImpl(holder); |
446 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); | 446 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); |
447 if (exceptionState.throwIfNeeded()) | 447 if (exceptionState.hadException()) |
448 return; | 448 return; |
449 impl->setFloatAttribute(cppValue); | 449 impl->setFloatAttribute(cppValue); |
450 } | 450 } |
451 | 451 |
452 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 452 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
453 { | 453 { |
454 v8::Local<v8::Value> v8Value = info[0]; | 454 v8::Local<v8::Value> v8Value = info[0]; |
455 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); | 455 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); |
456 } | 456 } |
457 | 457 |
458 static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 458 static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
459 { | 459 { |
460 v8::Local<v8::Object> holder = info.Holder(); | 460 v8::Local<v8::Object> holder = info.Holder(); |
461 TestObject* impl = V8TestObject::toImpl(holder); | 461 TestObject* impl = V8TestObject::toImpl(holder); |
462 v8SetReturnValueInt(info, impl->longAttribute()); | 462 v8SetReturnValueInt(info, impl->longAttribute()); |
463 } | 463 } |
464 | 464 |
465 static void longAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 465 static void longAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
466 { | 466 { |
467 TestObjectV8Internal::longAttributeAttributeGetter(info); | 467 TestObjectV8Internal::longAttributeAttributeGetter(info); |
468 } | 468 } |
469 | 469 |
470 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) | 470 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) |
471 { | 471 { |
472 v8::Local<v8::Object> holder = info.Holder(); | 472 v8::Local<v8::Object> holder = info.Holder(); |
473 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); | 473 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); |
474 TestObject* impl = V8TestObject::toImpl(holder); | 474 TestObject* impl = V8TestObject::toImpl(holder); |
475 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 475 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
476 if (exceptionState.throwIfNeeded()) | 476 if (exceptionState.hadException()) |
477 return; | 477 return; |
478 impl->setLongAttribute(cppValue); | 478 impl->setLongAttribute(cppValue); |
479 } | 479 } |
480 | 480 |
481 static void longAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 481 static void longAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
482 { | 482 { |
483 v8::Local<v8::Value> v8Value = info[0]; | 483 v8::Local<v8::Value> v8Value = info[0]; |
484 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); | 484 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); |
485 } | 485 } |
486 | 486 |
487 static void longLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) | 487 static void longLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) |
488 { | 488 { |
489 v8::Local<v8::Object> holder = info.Holder(); | 489 v8::Local<v8::Object> holder = info.Holder(); |
490 TestObject* impl = V8TestObject::toImpl(holder); | 490 TestObject* impl = V8TestObject::toImpl(holder); |
491 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); | 491 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); |
492 } | 492 } |
493 | 493 |
494 static void longLongAttributeAttributeGetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 494 static void longLongAttributeAttributeGetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
495 { | 495 { |
496 TestObjectV8Internal::longLongAttributeAttributeGetter(info); | 496 TestObjectV8Internal::longLongAttributeAttributeGetter(info); |
497 } | 497 } |
498 | 498 |
499 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) | 499 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) |
500 { | 500 { |
501 v8::Local<v8::Object> holder = info.Holder(); | 501 v8::Local<v8::Object> holder = info.Holder(); |
502 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); | 502 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); |
503 TestObject* impl = V8TestObject::toImpl(holder); | 503 TestObject* impl = V8TestObject::toImpl(holder); |
504 long long cppValue = toInt64(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); | 504 long long cppValue = toInt64(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); |
505 if (exceptionState.throwIfNeeded()) | 505 if (exceptionState.hadException()) |
506 return; | 506 return; |
507 impl->setLongLongAttribute(cppValue); | 507 impl->setLongLongAttribute(cppValue); |
508 } | 508 } |
509 | 509 |
510 static void longLongAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 510 static void longLongAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
511 { | 511 { |
512 v8::Local<v8::Value> v8Value = info[0]; | 512 v8::Local<v8::Value> v8Value = info[0]; |
513 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); | 513 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); |
514 } | 514 } |
515 | 515 |
516 static void octetAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 516 static void octetAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
517 { | 517 { |
518 v8::Local<v8::Object> holder = info.Holder(); | 518 v8::Local<v8::Object> holder = info.Holder(); |
519 TestObject* impl = V8TestObject::toImpl(holder); | 519 TestObject* impl = V8TestObject::toImpl(holder); |
520 v8SetReturnValueUnsigned(info, impl->octetAttribute()); | 520 v8SetReturnValueUnsigned(info, impl->octetAttribute()); |
521 } | 521 } |
522 | 522 |
523 static void octetAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 523 static void octetAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
524 { | 524 { |
525 TestObjectV8Internal::octetAttributeAttributeGetter(info); | 525 TestObjectV8Internal::octetAttributeAttributeGetter(info); |
526 } | 526 } |
527 | 527 |
528 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 528 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) |
529 { | 529 { |
530 v8::Local<v8::Object> holder = info.Holder(); | 530 v8::Local<v8::Object> holder = info.Holder(); |
531 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); | 531 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); |
532 TestObject* impl = V8TestObject::toImpl(holder); | 532 TestObject* impl = V8TestObject::toImpl(holder); |
533 unsigned cppValue = toUInt8(info.GetIsolate(), v8Value, NormalConversion, ex
ceptionState); | 533 unsigned cppValue = toUInt8(info.GetIsolate(), v8Value, NormalConversion, ex
ceptionState); |
534 if (exceptionState.throwIfNeeded()) | 534 if (exceptionState.hadException()) |
535 return; | 535 return; |
536 impl->setOctetAttribute(cppValue); | 536 impl->setOctetAttribute(cppValue); |
537 } | 537 } |
538 | 538 |
539 static void octetAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 539 static void octetAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
540 { | 540 { |
541 v8::Local<v8::Value> v8Value = info[0]; | 541 v8::Local<v8::Value> v8Value = info[0]; |
542 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); | 542 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); |
543 } | 543 } |
544 | 544 |
545 static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 545 static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
546 { | 546 { |
547 v8::Local<v8::Object> holder = info.Holder(); | 547 v8::Local<v8::Object> holder = info.Holder(); |
548 TestObject* impl = V8TestObject::toImpl(holder); | 548 TestObject* impl = V8TestObject::toImpl(holder); |
549 v8SetReturnValueInt(info, impl->shortAttribute()); | 549 v8SetReturnValueInt(info, impl->shortAttribute()); |
550 } | 550 } |
551 | 551 |
552 static void shortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 552 static void shortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
553 { | 553 { |
554 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 554 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
555 } | 555 } |
556 | 556 |
557 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 557 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) |
558 { | 558 { |
559 v8::Local<v8::Object> holder = info.Holder(); | 559 v8::Local<v8::Object> holder = info.Holder(); |
560 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 560 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
561 TestObject* impl = V8TestObject::toImpl(holder); | 561 TestObject* impl = V8TestObject::toImpl(holder); |
562 int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 562 int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
563 if (exceptionState.throwIfNeeded()) | 563 if (exceptionState.hadException()) |
564 return; | 564 return; |
565 impl->setShortAttribute(cppValue); | 565 impl->setShortAttribute(cppValue); |
566 } | 566 } |
567 | 567 |
568 static void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 568 static void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
569 { | 569 { |
570 v8::Local<v8::Value> v8Value = info[0]; | 570 v8::Local<v8::Value> v8Value = info[0]; |
571 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 571 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
572 } | 572 } |
573 | 573 |
574 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 574 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
575 { | 575 { |
576 v8::Local<v8::Object> holder = info.Holder(); | 576 v8::Local<v8::Object> holder = info.Holder(); |
577 TestObject* impl = V8TestObject::toImpl(holder); | 577 TestObject* impl = V8TestObject::toImpl(holder); |
578 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 578 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
579 } | 579 } |
580 | 580 |
581 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 581 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
582 { | 582 { |
583 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); | 583 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); |
584 } | 584 } |
585 | 585 |
586 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 586 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) |
587 { | 587 { |
588 v8::Local<v8::Object> holder = info.Holder(); | 588 v8::Local<v8::Object> holder = info.Holder(); |
589 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestObject", holder, info.GetIsolate()); | 589 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestObject", holder, info.GetIsolate()); |
590 TestObject* impl = V8TestObject::toImpl(holder); | 590 TestObject* impl = V8TestObject::toImpl(holder); |
591 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); | 591 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); |
592 if (exceptionState.throwIfNeeded()) | 592 if (exceptionState.hadException()) |
593 return; | 593 return; |
594 impl->setUnrestrictedDoubleAttribute(cppValue); | 594 impl->setUnrestrictedDoubleAttribute(cppValue); |
595 } | 595 } |
596 | 596 |
597 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 597 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
598 { | 598 { |
599 v8::Local<v8::Value> v8Value = info[0]; | 599 v8::Local<v8::Value> v8Value = info[0]; |
600 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); | 600 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); |
601 } | 601 } |
602 | 602 |
603 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 603 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) |
604 { | 604 { |
605 v8::Local<v8::Object> holder = info.Holder(); | 605 v8::Local<v8::Object> holder = info.Holder(); |
606 TestObject* impl = V8TestObject::toImpl(holder); | 606 TestObject* impl = V8TestObject::toImpl(holder); |
607 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 607 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
608 } | 608 } |
609 | 609 |
610 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 610 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
611 { | 611 { |
612 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); | 612 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); |
613 } | 613 } |
614 | 614 |
615 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 615 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) |
616 { | 616 { |
617 v8::Local<v8::Object> holder = info.Holder(); | 617 v8::Local<v8::Object> holder = info.Holder(); |
618 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestObject", holder, info.GetIsolate()); | 618 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestObject", holder, info.GetIsolate()); |
619 TestObject* impl = V8TestObject::toImpl(holder); | 619 TestObject* impl = V8TestObject::toImpl(holder); |
620 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); | 620 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); |
621 if (exceptionState.throwIfNeeded()) | 621 if (exceptionState.hadException()) |
622 return; | 622 return; |
623 impl->setUnrestrictedFloatAttribute(cppValue); | 623 impl->setUnrestrictedFloatAttribute(cppValue); |
624 } | 624 } |
625 | 625 |
626 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 626 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
627 { | 627 { |
628 v8::Local<v8::Value> v8Value = info[0]; | 628 v8::Local<v8::Value> v8Value = info[0]; |
629 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); | 629 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); |
630 } | 630 } |
631 | 631 |
632 static void unsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 632 static void unsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
633 { | 633 { |
634 v8::Local<v8::Object> holder = info.Holder(); | 634 v8::Local<v8::Object> holder = info.Holder(); |
635 TestObject* impl = V8TestObject::toImpl(holder); | 635 TestObject* impl = V8TestObject::toImpl(holder); |
636 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); | 636 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); |
637 } | 637 } |
638 | 638 |
639 static void unsignedLongAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 639 static void unsignedLongAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
640 { | 640 { |
641 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); | 641 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); |
642 } | 642 } |
643 | 643 |
644 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 644 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
645 { | 645 { |
646 v8::Local<v8::Object> holder = info.Holder(); | 646 v8::Local<v8::Object> holder = info.Holder(); |
647 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); | 647 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); |
648 TestObject* impl = V8TestObject::toImpl(holder); | 648 TestObject* impl = V8TestObject::toImpl(holder); |
649 unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); | 649 unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); |
650 if (exceptionState.throwIfNeeded()) | 650 if (exceptionState.hadException()) |
651 return; | 651 return; |
652 impl->setUnsignedLongAttribute(cppValue); | 652 impl->setUnsignedLongAttribute(cppValue); |
653 } | 653 } |
654 | 654 |
655 static void unsignedLongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 655 static void unsignedLongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
656 { | 656 { |
657 v8::Local<v8::Value> v8Value = info[0]; | 657 v8::Local<v8::Value> v8Value = info[0]; |
658 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); | 658 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); |
659 } | 659 } |
660 | 660 |
661 static void unsignedLongLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 661 static void unsignedLongLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
662 { | 662 { |
663 v8::Local<v8::Object> holder = info.Holder(); | 663 v8::Local<v8::Object> holder = info.Holder(); |
664 TestObject* impl = V8TestObject::toImpl(holder); | 664 TestObject* impl = V8TestObject::toImpl(holder); |
665 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); | 665 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); |
666 } | 666 } |
667 | 667 |
668 static void unsignedLongLongAttributeAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 668 static void unsignedLongLongAttributeAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
669 { | 669 { |
670 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); | 670 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); |
671 } | 671 } |
672 | 672 |
673 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 673 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
674 { | 674 { |
675 v8::Local<v8::Object> holder = info.Holder(); | 675 v8::Local<v8::Object> holder = info.Holder(); |
676 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 676 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
677 TestObject* impl = V8TestObject::toImpl(holder); | 677 TestObject* impl = V8TestObject::toImpl(holder); |
678 unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalCon
version, exceptionState); | 678 unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalCon
version, exceptionState); |
679 if (exceptionState.throwIfNeeded()) | 679 if (exceptionState.hadException()) |
680 return; | 680 return; |
681 impl->setUnsignedLongLongAttribute(cppValue); | 681 impl->setUnsignedLongLongAttribute(cppValue); |
682 } | 682 } |
683 | 683 |
684 static void unsignedLongLongAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 684 static void unsignedLongLongAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
685 { | 685 { |
686 v8::Local<v8::Value> v8Value = info[0]; | 686 v8::Local<v8::Value> v8Value = info[0]; |
687 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); | 687 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); |
688 } | 688 } |
689 | 689 |
690 static void unsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 690 static void unsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) |
691 { | 691 { |
692 v8::Local<v8::Object> holder = info.Holder(); | 692 v8::Local<v8::Object> holder = info.Holder(); |
693 TestObject* impl = V8TestObject::toImpl(holder); | 693 TestObject* impl = V8TestObject::toImpl(holder); |
694 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); | 694 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); |
695 } | 695 } |
696 | 696 |
697 static void unsignedShortAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 697 static void unsignedShortAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
698 { | 698 { |
699 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); | 699 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); |
700 } | 700 } |
701 | 701 |
702 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 702 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
703 { | 703 { |
704 v8::Local<v8::Object> holder = info.Holder(); | 704 v8::Local<v8::Object> holder = info.Holder(); |
705 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); | 705 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); |
706 TestObject* impl = V8TestObject::toImpl(holder); | 706 TestObject* impl = V8TestObject::toImpl(holder); |
707 unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); | 707 unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); |
708 if (exceptionState.throwIfNeeded()) | 708 if (exceptionState.hadException()) |
709 return; | 709 return; |
710 impl->setUnsignedShortAttribute(cppValue); | 710 impl->setUnsignedShortAttribute(cppValue); |
711 } | 711 } |
712 | 712 |
713 static void unsignedShortAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 713 static void unsignedShortAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
714 { | 714 { |
715 v8::Local<v8::Value> v8Value = info[0]; | 715 v8::Local<v8::Value> v8Value = info[0]; |
716 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); | 716 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); |
717 } | 717 } |
718 | 718 |
(...skipping 10 matching lines...) Expand all Loading... |
729 } | 729 } |
730 | 730 |
731 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 731 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) |
732 { | 732 { |
733 v8::Local<v8::Object> holder = info.Holder(); | 733 v8::Local<v8::Object> holder = info.Holder(); |
734 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyAttribute", "TestObject", holder, info.GetIsolate()); | 734 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyAttribute", "TestObject", holder, info.GetIsolate()); |
735 TestObject* impl = V8TestObject::toImpl(holder); | 735 TestObject* impl = V8TestObject::toImpl(holder); |
736 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 736 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
737 if (!cppValue) { | 737 if (!cppValue) { |
738 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); | 738 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); |
739 exceptionState.throwIfNeeded(); | |
740 return; | 739 return; |
741 } | 740 } |
742 impl->setTestInterfaceEmptyAttribute(cppValue); | 741 impl->setTestInterfaceEmptyAttribute(cppValue); |
743 } | 742 } |
744 | 743 |
745 static void testInterfaceEmptyAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 744 static void testInterfaceEmptyAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
746 { | 745 { |
747 v8::Local<v8::Value> v8Value = info[0]; | 746 v8::Local<v8::Value> v8Value = info[0]; |
748 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); | 747 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); |
749 } | 748 } |
(...skipping 11 matching lines...) Expand all Loading... |
761 } | 760 } |
762 | 761 |
763 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 762 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
764 { | 763 { |
765 v8::Local<v8::Object> holder = info.Holder(); | 764 v8::Local<v8::Object> holder = info.Holder(); |
766 ExceptionState exceptionState(ExceptionState::SetterContext, "testObjectAttr
ibute", "TestObject", holder, info.GetIsolate()); | 765 ExceptionState exceptionState(ExceptionState::SetterContext, "testObjectAttr
ibute", "TestObject", holder, info.GetIsolate()); |
767 TestObject* impl = V8TestObject::toImpl(holder); | 766 TestObject* impl = V8TestObject::toImpl(holder); |
768 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(),
v8Value); | 767 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(),
v8Value); |
769 if (!cppValue) { | 768 if (!cppValue) { |
770 exceptionState.throwTypeError("The provided value is not of type 'TestOb
ject'."); | 769 exceptionState.throwTypeError("The provided value is not of type 'TestOb
ject'."); |
771 exceptionState.throwIfNeeded(); | |
772 return; | 770 return; |
773 } | 771 } |
774 impl->setTestObjectAttribute(cppValue); | 772 impl->setTestObjectAttribute(cppValue); |
775 } | 773 } |
776 | 774 |
777 static void testObjectAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 775 static void testObjectAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
778 { | 776 { |
779 v8::Local<v8::Value> v8Value = info[0]; | 777 v8::Local<v8::Value> v8Value = info[0]; |
780 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); | 778 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); |
781 } | 779 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 { | 841 { |
844 TestObjectV8Internal::cssAttributeAttributeGetter(info); | 842 TestObjectV8Internal::cssAttributeAttributeGetter(info); |
845 } | 843 } |
846 | 844 |
847 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) | 845 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) |
848 { | 846 { |
849 v8::Local<v8::Object> holder = info.Holder(); | 847 v8::Local<v8::Object> holder = info.Holder(); |
850 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); | 848 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); |
851 TestObject* impl = V8TestObject::toImpl(holder); | 849 TestObject* impl = V8TestObject::toImpl(holder); |
852 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 850 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
853 if (exceptionState.throwIfNeeded()) | 851 if (exceptionState.hadException()) |
854 return; | 852 return; |
855 impl->setCSSAttribute(cppValue); | 853 impl->setCSSAttribute(cppValue); |
856 } | 854 } |
857 | 855 |
858 static void cssAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 856 static void cssAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
859 { | 857 { |
860 v8::Local<v8::Value> v8Value = info[0]; | 858 v8::Local<v8::Value> v8Value = info[0]; |
861 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); | 859 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); |
862 } | 860 } |
863 | 861 |
864 static void imeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) | 862 static void imeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) |
865 { | 863 { |
866 v8::Local<v8::Object> holder = info.Holder(); | 864 v8::Local<v8::Object> holder = info.Holder(); |
867 TestObject* impl = V8TestObject::toImpl(holder); | 865 TestObject* impl = V8TestObject::toImpl(holder); |
868 v8SetReturnValueInt(info, impl->imeAttribute()); | 866 v8SetReturnValueInt(info, impl->imeAttribute()); |
869 } | 867 } |
870 | 868 |
871 static void imeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 869 static void imeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
872 { | 870 { |
873 TestObjectV8Internal::imeAttributeAttributeGetter(info); | 871 TestObjectV8Internal::imeAttributeAttributeGetter(info); |
874 } | 872 } |
875 | 873 |
876 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) | 874 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) |
877 { | 875 { |
878 v8::Local<v8::Object> holder = info.Holder(); | 876 v8::Local<v8::Object> holder = info.Holder(); |
879 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); | 877 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); |
880 TestObject* impl = V8TestObject::toImpl(holder); | 878 TestObject* impl = V8TestObject::toImpl(holder); |
881 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 879 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
882 if (exceptionState.throwIfNeeded()) | 880 if (exceptionState.hadException()) |
883 return; | 881 return; |
884 impl->setIMEAttribute(cppValue); | 882 impl->setIMEAttribute(cppValue); |
885 } | 883 } |
886 | 884 |
887 static void imeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 885 static void imeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
888 { | 886 { |
889 v8::Local<v8::Value> v8Value = info[0]; | 887 v8::Local<v8::Value> v8Value = info[0]; |
890 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); | 888 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); |
891 } | 889 } |
892 | 890 |
893 static void svgAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) | 891 static void svgAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) |
894 { | 892 { |
895 v8::Local<v8::Object> holder = info.Holder(); | 893 v8::Local<v8::Object> holder = info.Holder(); |
896 TestObject* impl = V8TestObject::toImpl(holder); | 894 TestObject* impl = V8TestObject::toImpl(holder); |
897 v8SetReturnValueInt(info, impl->svgAttribute()); | 895 v8SetReturnValueInt(info, impl->svgAttribute()); |
898 } | 896 } |
899 | 897 |
900 static void svgAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 898 static void svgAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
901 { | 899 { |
902 TestObjectV8Internal::svgAttributeAttributeGetter(info); | 900 TestObjectV8Internal::svgAttributeAttributeGetter(info); |
903 } | 901 } |
904 | 902 |
905 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) | 903 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) |
906 { | 904 { |
907 v8::Local<v8::Object> holder = info.Holder(); | 905 v8::Local<v8::Object> holder = info.Holder(); |
908 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); | 906 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); |
909 TestObject* impl = V8TestObject::toImpl(holder); | 907 TestObject* impl = V8TestObject::toImpl(holder); |
910 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 908 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
911 if (exceptionState.throwIfNeeded()) | 909 if (exceptionState.hadException()) |
912 return; | 910 return; |
913 impl->setSVGAttribute(cppValue); | 911 impl->setSVGAttribute(cppValue); |
914 } | 912 } |
915 | 913 |
916 static void svgAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 914 static void svgAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
917 { | 915 { |
918 v8::Local<v8::Value> v8Value = info[0]; | 916 v8::Local<v8::Value> v8Value = info[0]; |
919 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); | 917 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); |
920 } | 918 } |
921 | 919 |
922 static void xmlAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) | 920 static void xmlAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value
>& info) |
923 { | 921 { |
924 v8::Local<v8::Object> holder = info.Holder(); | 922 v8::Local<v8::Object> holder = info.Holder(); |
925 TestObject* impl = V8TestObject::toImpl(holder); | 923 TestObject* impl = V8TestObject::toImpl(holder); |
926 v8SetReturnValueInt(info, impl->xmlAttribute()); | 924 v8SetReturnValueInt(info, impl->xmlAttribute()); |
927 } | 925 } |
928 | 926 |
929 static void xmlAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 927 static void xmlAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
930 { | 928 { |
931 TestObjectV8Internal::xmlAttributeAttributeGetter(info); | 929 TestObjectV8Internal::xmlAttributeAttributeGetter(info); |
932 } | 930 } |
933 | 931 |
934 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) | 932 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
FunctionCallbackInfo<v8::Value>& info) |
935 { | 933 { |
936 v8::Local<v8::Object> holder = info.Holder(); | 934 v8::Local<v8::Object> holder = info.Holder(); |
937 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); | 935 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); |
938 TestObject* impl = V8TestObject::toImpl(holder); | 936 TestObject* impl = V8TestObject::toImpl(holder); |
939 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 937 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
940 if (exceptionState.throwIfNeeded()) | 938 if (exceptionState.hadException()) |
941 return; | 939 return; |
942 impl->setXMLAttribute(cppValue); | 940 impl->setXMLAttribute(cppValue); |
943 } | 941 } |
944 | 942 |
945 static void xmlAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 943 static void xmlAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
946 { | 944 { |
947 v8::Local<v8::Value> v8Value = info[0]; | 945 v8::Local<v8::Value> v8Value = info[0]; |
948 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); | 946 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); |
949 } | 947 } |
950 | 948 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 { | 983 { |
986 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); | 984 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); |
987 } | 985 } |
988 | 986 |
989 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 987 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
990 { | 988 { |
991 v8::Local<v8::Object> holder = info.Holder(); | 989 v8::Local<v8::Object> holder = info.Holder(); |
992 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri
ptValueAttribute", "TestObject", holder, info.GetIsolate()); | 990 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri
ptValueAttribute", "TestObject", holder, info.GetIsolate()); |
993 TestObject* impl = V8TestObject::toImpl(holder); | 991 TestObject* impl = V8TestObject::toImpl(holder); |
994 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValue::serialize(in
fo.GetIsolate(), v8Value, nullptr, nullptr, exceptionState); | 992 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValue::serialize(in
fo.GetIsolate(), v8Value, nullptr, nullptr, exceptionState); |
995 if (exceptionState.throwIfNeeded()) | 993 if (exceptionState.hadException()) |
996 return; | 994 return; |
997 impl->setSerializedScriptValueAttribute(cppValue); | 995 impl->setSerializedScriptValueAttribute(cppValue); |
998 } | 996 } |
999 | 997 |
1000 static void serializedScriptValueAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 998 static void serializedScriptValueAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1001 { | 999 { |
1002 v8::Local<v8::Value> v8Value = info[0]; | 1000 v8::Local<v8::Value> v8Value = info[0]; |
1003 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); | 1001 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); |
1004 } | 1002 } |
1005 | 1003 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 } | 1066 } |
1069 | 1067 |
1070 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) | 1068 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) |
1071 { | 1069 { |
1072 v8::Local<v8::Object> holder = info.Holder(); | 1070 v8::Local<v8::Object> holder = info.Holder(); |
1073 ExceptionState exceptionState(ExceptionState::SetterContext, "windowAttribut
e", "TestObject", holder, info.GetIsolate()); | 1071 ExceptionState exceptionState(ExceptionState::SetterContext, "windowAttribut
e", "TestObject", holder, info.GetIsolate()); |
1074 TestObject* impl = V8TestObject::toImpl(holder); | 1072 TestObject* impl = V8TestObject::toImpl(holder); |
1075 DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); | 1073 DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); |
1076 if (!cppValue) { | 1074 if (!cppValue) { |
1077 exceptionState.throwTypeError("The provided value is not of type 'Window
'."); | 1075 exceptionState.throwTypeError("The provided value is not of type 'Window
'."); |
1078 exceptionState.throwIfNeeded(); | |
1079 return; | 1076 return; |
1080 } | 1077 } |
1081 impl->setWindowAttribute(cppValue); | 1078 impl->setWindowAttribute(cppValue); |
1082 } | 1079 } |
1083 | 1080 |
1084 static void windowAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1081 static void windowAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
1085 { | 1082 { |
1086 v8::Local<v8::Value> v8Value = info[0]; | 1083 v8::Local<v8::Value> v8Value = info[0]; |
1087 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); | 1084 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); |
1088 } | 1085 } |
(...skipping 11 matching lines...) Expand all Loading... |
1100 } | 1097 } |
1101 | 1098 |
1102 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) | 1099 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) |
1103 { | 1100 { |
1104 v8::Local<v8::Object> holder = info.Holder(); | 1101 v8::Local<v8::Object> holder = info.Holder(); |
1105 ExceptionState exceptionState(ExceptionState::SetterContext, "documentAttrib
ute", "TestObject", holder, info.GetIsolate()); | 1102 ExceptionState exceptionState(ExceptionState::SetterContext, "documentAttrib
ute", "TestObject", holder, info.GetIsolate()); |
1106 TestObject* impl = V8TestObject::toImpl(holder); | 1103 TestObject* impl = V8TestObject::toImpl(holder); |
1107 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Va
lue); | 1104 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Va
lue); |
1108 if (!cppValue) { | 1105 if (!cppValue) { |
1109 exceptionState.throwTypeError("The provided value is not of type 'Docume
nt'."); | 1106 exceptionState.throwTypeError("The provided value is not of type 'Docume
nt'."); |
1110 exceptionState.throwIfNeeded(); | |
1111 return; | 1107 return; |
1112 } | 1108 } |
1113 impl->setDocumentAttribute(cppValue); | 1109 impl->setDocumentAttribute(cppValue); |
1114 } | 1110 } |
1115 | 1111 |
1116 static void documentAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 1112 static void documentAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
1117 { | 1113 { |
1118 v8::Local<v8::Value> v8Value = info[0]; | 1114 v8::Local<v8::Value> v8Value = info[0]; |
1119 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); | 1115 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); |
1120 } | 1116 } |
(...skipping 11 matching lines...) Expand all Loading... |
1132 } | 1128 } |
1133 | 1129 |
1134 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 1130 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
1135 { | 1131 { |
1136 v8::Local<v8::Object> holder = info.Holder(); | 1132 v8::Local<v8::Object> holder = info.Holder(); |
1137 ExceptionState exceptionState(ExceptionState::SetterContext, "documentFragme
ntAttribute", "TestObject", holder, info.GetIsolate()); | 1133 ExceptionState exceptionState(ExceptionState::SetterContext, "documentFragme
ntAttribute", "TestObject", holder, info.GetIsolate()); |
1138 TestObject* impl = V8TestObject::toImpl(holder); | 1134 TestObject* impl = V8TestObject::toImpl(holder); |
1139 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.Ge
tIsolate(), v8Value); | 1135 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.Ge
tIsolate(), v8Value); |
1140 if (!cppValue) { | 1136 if (!cppValue) { |
1141 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntFragment'."); | 1137 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntFragment'."); |
1142 exceptionState.throwIfNeeded(); | |
1143 return; | 1138 return; |
1144 } | 1139 } |
1145 impl->setDocumentFragmentAttribute(cppValue); | 1140 impl->setDocumentFragmentAttribute(cppValue); |
1146 } | 1141 } |
1147 | 1142 |
1148 static void documentFragmentAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 1143 static void documentFragmentAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
1149 { | 1144 { |
1150 v8::Local<v8::Value> v8Value = info[0]; | 1145 v8::Local<v8::Value> v8Value = info[0]; |
1151 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); | 1146 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); |
1152 } | 1147 } |
(...skipping 11 matching lines...) Expand all Loading... |
1164 } | 1159 } |
1165 | 1160 |
1166 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 1161 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
1167 { | 1162 { |
1168 v8::Local<v8::Object> holder = info.Holder(); | 1163 v8::Local<v8::Object> holder = info.Holder(); |
1169 ExceptionState exceptionState(ExceptionState::SetterContext, "documentTypeAt
tribute", "TestObject", holder, info.GetIsolate()); | 1164 ExceptionState exceptionState(ExceptionState::SetterContext, "documentTypeAt
tribute", "TestObject", holder, info.GetIsolate()); |
1170 TestObject* impl = V8TestObject::toImpl(holder); | 1165 TestObject* impl = V8TestObject::toImpl(holder); |
1171 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate
(), v8Value); | 1166 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate
(), v8Value); |
1172 if (!cppValue) { | 1167 if (!cppValue) { |
1173 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntType'."); | 1168 exceptionState.throwTypeError("The provided value is not of type 'Docume
ntType'."); |
1174 exceptionState.throwIfNeeded(); | |
1175 return; | 1169 return; |
1176 } | 1170 } |
1177 impl->setDocumentTypeAttribute(cppValue); | 1171 impl->setDocumentTypeAttribute(cppValue); |
1178 } | 1172 } |
1179 | 1173 |
1180 static void documentTypeAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1174 static void documentTypeAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
1181 { | 1175 { |
1182 v8::Local<v8::Value> v8Value = info[0]; | 1176 v8::Local<v8::Value> v8Value = info[0]; |
1183 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); | 1177 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); |
1184 } | 1178 } |
(...skipping 11 matching lines...) Expand all Loading... |
1196 } | 1190 } |
1197 | 1191 |
1198 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) | 1192 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) |
1199 { | 1193 { |
1200 v8::Local<v8::Object> holder = info.Holder(); | 1194 v8::Local<v8::Object> holder = info.Holder(); |
1201 ExceptionState exceptionState(ExceptionState::SetterContext, "elementAttribu
te", "TestObject", holder, info.GetIsolate()); | 1195 ExceptionState exceptionState(ExceptionState::SetterContext, "elementAttribu
te", "TestObject", holder, info.GetIsolate()); |
1202 TestObject* impl = V8TestObject::toImpl(holder); | 1196 TestObject* impl = V8TestObject::toImpl(holder); |
1203 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); | 1197 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); |
1204 if (!cppValue) { | 1198 if (!cppValue) { |
1205 exceptionState.throwTypeError("The provided value is not of type 'Elemen
t'."); | 1199 exceptionState.throwTypeError("The provided value is not of type 'Elemen
t'."); |
1206 exceptionState.throwIfNeeded(); | |
1207 return; | 1200 return; |
1208 } | 1201 } |
1209 impl->setElementAttribute(cppValue); | 1202 impl->setElementAttribute(cppValue); |
1210 } | 1203 } |
1211 | 1204 |
1212 static void elementAttributeAttributeSetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 1205 static void elementAttributeAttributeSetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
1213 { | 1206 { |
1214 v8::Local<v8::Value> v8Value = info[0]; | 1207 v8::Local<v8::Value> v8Value = info[0]; |
1215 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); | 1208 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); |
1216 } | 1209 } |
(...skipping 11 matching lines...) Expand all Loading... |
1228 } | 1221 } |
1229 | 1222 |
1230 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) | 1223 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) |
1231 { | 1224 { |
1232 v8::Local<v8::Object> holder = info.Holder(); | 1225 v8::Local<v8::Object> holder = info.Holder(); |
1233 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", holder, info.GetIsolate()); | 1226 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", holder, info.GetIsolate()); |
1234 TestObject* impl = V8TestObject::toImpl(holder); | 1227 TestObject* impl = V8TestObject::toImpl(holder); |
1235 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 1228 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
1236 if (!cppValue) { | 1229 if (!cppValue) { |
1237 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 1230 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
1238 exceptionState.throwIfNeeded(); | |
1239 return; | 1231 return; |
1240 } | 1232 } |
1241 impl->setNodeAttribute(cppValue); | 1233 impl->setNodeAttribute(cppValue); |
1242 } | 1234 } |
1243 | 1235 |
1244 static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 1236 static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
1245 { | 1237 { |
1246 v8::Local<v8::Value> v8Value = info[0]; | 1238 v8::Local<v8::Value> v8Value = info[0]; |
1247 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 1239 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
1248 } | 1240 } |
(...skipping 11 matching lines...) Expand all Loading... |
1260 } | 1252 } |
1261 | 1253 |
1262 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 1254 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
1263 { | 1255 { |
1264 v8::Local<v8::Object> holder = info.Holder(); | 1256 v8::Local<v8::Object> holder = info.Holder(); |
1265 ExceptionState exceptionState(ExceptionState::SetterContext, "shadowRootAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1257 ExceptionState exceptionState(ExceptionState::SetterContext, "shadowRootAttr
ibute", "TestObject", holder, info.GetIsolate()); |
1266 TestObject* impl = V8TestObject::toImpl(holder); | 1258 TestObject* impl = V8TestObject::toImpl(holder); |
1267 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(),
v8Value); | 1259 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(),
v8Value); |
1268 if (!cppValue) { | 1260 if (!cppValue) { |
1269 exceptionState.throwTypeError("The provided value is not of type 'Shadow
Root'."); | 1261 exceptionState.throwTypeError("The provided value is not of type 'Shadow
Root'."); |
1270 exceptionState.throwIfNeeded(); | |
1271 return; | 1262 return; |
1272 } | 1263 } |
1273 impl->setShadowRootAttribute(cppValue); | 1264 impl->setShadowRootAttribute(cppValue); |
1274 } | 1265 } |
1275 | 1266 |
1276 static void shadowRootAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1267 static void shadowRootAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1277 { | 1268 { |
1278 v8::Local<v8::Value> v8Value = info[0]; | 1269 v8::Local<v8::Value> v8Value = info[0]; |
1279 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); | 1270 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); |
1280 } | 1271 } |
(...skipping 11 matching lines...) Expand all Loading... |
1292 } | 1283 } |
1293 | 1284 |
1294 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 1285 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
1295 { | 1286 { |
1296 v8::Local<v8::Object> holder = info.Holder(); | 1287 v8::Local<v8::Object> holder = info.Holder(); |
1297 ExceptionState exceptionState(ExceptionState::SetterContext, "arrayBufferAtt
ribute", "TestObject", holder, info.GetIsolate()); | 1288 ExceptionState exceptionState(ExceptionState::SetterContext, "arrayBufferAtt
ribute", "TestObject", holder, info.GetIsolate()); |
1298 TestObject* impl = V8TestObject::toImpl(holder); | 1289 TestObject* impl = V8TestObject::toImpl(holder); |
1299 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl
(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; | 1290 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl
(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; |
1300 if (!cppValue) { | 1291 if (!cppValue) { |
1301 exceptionState.throwTypeError("The provided value is not of type 'ArrayB
uffer'."); | 1292 exceptionState.throwTypeError("The provided value is not of type 'ArrayB
uffer'."); |
1302 exceptionState.throwIfNeeded(); | |
1303 return; | 1293 return; |
1304 } | 1294 } |
1305 impl->setArrayBufferAttribute(cppValue); | 1295 impl->setArrayBufferAttribute(cppValue); |
1306 } | 1296 } |
1307 | 1297 |
1308 static void arrayBufferAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 1298 static void arrayBufferAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
1309 { | 1299 { |
1310 v8::Local<v8::Value> v8Value = info[0]; | 1300 v8::Local<v8::Value> v8Value = info[0]; |
1311 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); | 1301 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); |
1312 } | 1302 } |
(...skipping 11 matching lines...) Expand all Loading... |
1324 } | 1314 } |
1325 | 1315 |
1326 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 1316 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
1327 { | 1317 { |
1328 v8::Local<v8::Object> holder = info.Holder(); | 1318 v8::Local<v8::Object> holder = info.Holder(); |
1329 ExceptionState exceptionState(ExceptionState::SetterContext, "float32ArrayAt
tribute", "TestObject", holder, info.GetIsolate()); | 1319 ExceptionState exceptionState(ExceptionState::SetterContext, "float32ArrayAt
tribute", "TestObject", holder, info.GetIsolate()); |
1330 TestObject* impl = V8TestObject::toImpl(holder); | 1320 TestObject* impl = V8TestObject::toImpl(holder); |
1331 DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toIm
pl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; | 1321 DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toIm
pl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; |
1332 if (!cppValue) { | 1322 if (!cppValue) { |
1333 exceptionState.throwTypeError("The provided value is not of type 'Float3
2Array'."); | 1323 exceptionState.throwTypeError("The provided value is not of type 'Float3
2Array'."); |
1334 exceptionState.throwIfNeeded(); | |
1335 return; | 1324 return; |
1336 } | 1325 } |
1337 impl->setFloat32ArrayAttribute(cppValue); | 1326 impl->setFloat32ArrayAttribute(cppValue); |
1338 } | 1327 } |
1339 | 1328 |
1340 static void float32ArrayAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1329 static void float32ArrayAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
1341 { | 1330 { |
1342 v8::Local<v8::Value> v8Value = info[0]; | 1331 v8::Local<v8::Value> v8Value = info[0]; |
1343 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); | 1332 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); |
1344 } | 1333 } |
(...skipping 11 matching lines...) Expand all Loading... |
1356 } | 1345 } |
1357 | 1346 |
1358 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 1347 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
1359 { | 1348 { |
1360 v8::Local<v8::Object> holder = info.Holder(); | 1349 v8::Local<v8::Object> holder = info.Holder(); |
1361 ExceptionState exceptionState(ExceptionState::SetterContext, "uint8ArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1350 ExceptionState exceptionState(ExceptionState::SetterContext, "uint8ArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); |
1362 TestObject* impl = V8TestObject::toImpl(holder); | 1351 TestObject* impl = V8TestObject::toImpl(holder); |
1363 DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8:
:Local<v8::Uint8Array>::Cast(v8Value)) : 0; | 1352 DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8:
:Local<v8::Uint8Array>::Cast(v8Value)) : 0; |
1364 if (!cppValue) { | 1353 if (!cppValue) { |
1365 exceptionState.throwTypeError("The provided value is not of type 'Uint8A
rray'."); | 1354 exceptionState.throwTypeError("The provided value is not of type 'Uint8A
rray'."); |
1366 exceptionState.throwIfNeeded(); | |
1367 return; | 1355 return; |
1368 } | 1356 } |
1369 impl->setUint8ArrayAttribute(cppValue); | 1357 impl->setUint8ArrayAttribute(cppValue); |
1370 } | 1358 } |
1371 | 1359 |
1372 static void uint8ArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1360 static void uint8ArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1373 { | 1361 { |
1374 v8::Local<v8::Value> v8Value = info[0]; | 1362 v8::Local<v8::Value> v8Value = info[0]; |
1375 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); | 1363 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); |
1376 } | 1364 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 { | 1446 { |
1459 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); | 1447 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); |
1460 } | 1448 } |
1461 | 1449 |
1462 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 1450 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
1463 { | 1451 { |
1464 v8::Local<v8::Object> holder = info.Holder(); | 1452 v8::Local<v8::Object> holder = info.Holder(); |
1465 ExceptionState exceptionState(ExceptionState::SetterContext, "stringArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); | 1453 ExceptionState exceptionState(ExceptionState::SetterContext, "stringArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); |
1466 TestObject* impl = V8TestObject::toImpl(holder); | 1454 TestObject* impl = V8TestObject::toImpl(holder); |
1467 Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIs
olate(), exceptionState); | 1455 Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIs
olate(), exceptionState); |
1468 if (exceptionState.throwIfNeeded()) | 1456 if (exceptionState.hadException()) |
1469 return; | 1457 return; |
1470 impl->setStringArrayAttribute(cppValue); | 1458 impl->setStringArrayAttribute(cppValue); |
1471 } | 1459 } |
1472 | 1460 |
1473 static void stringArrayAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 1461 static void stringArrayAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
1474 { | 1462 { |
1475 v8::Local<v8::Value> v8Value = info[0]; | 1463 v8::Local<v8::Value> v8Value = info[0]; |
1476 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); | 1464 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); |
1477 } | 1465 } |
1478 | 1466 |
1479 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 1467 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
1480 { | 1468 { |
1481 v8::Local<v8::Object> holder = info.Holder(); | 1469 v8::Local<v8::Object> holder = info.Holder(); |
1482 TestObject* impl = V8TestObject::toImpl(holder); | 1470 TestObject* impl = V8TestObject::toImpl(holder); |
1483 v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayAttribute(), info.H
older(), info.GetIsolate())); | 1471 v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayAttribute(), info.H
older(), info.GetIsolate())); |
1484 } | 1472 } |
1485 | 1473 |
1486 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 1474 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
1487 { | 1475 { |
1488 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); | 1476 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); |
1489 } | 1477 } |
1490 | 1478 |
1491 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 1479 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
1492 { | 1480 { |
1493 v8::Local<v8::Object> holder = info.Holder(); | 1481 v8::Local<v8::Object> holder = info.Holder(); |
1494 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyArrayAttribute", "TestObject", holder, info.GetIsolate()); | 1482 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyArrayAttribute", "TestObject", holder, info.GetIsolate()); |
1495 TestObject* impl = V8TestObject::toImpl(holder); | 1483 TestObject* impl = V8TestObject::toImpl(holder); |
1496 HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestI
nterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); | 1484 HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestI
nterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); |
1497 if (exceptionState.throwIfNeeded()) | 1485 if (exceptionState.hadException()) |
1498 return; | 1486 return; |
1499 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | 1487 impl->setTestInterfaceEmptyArrayAttribute(cppValue); |
1500 } | 1488 } |
1501 | 1489 |
1502 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 1490 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
1503 { | 1491 { |
1504 v8::Local<v8::Value> v8Value = info[0]; | 1492 v8::Local<v8::Value> v8Value = info[0]; |
1505 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); | 1493 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); |
1506 } | 1494 } |
1507 | 1495 |
1508 static void floatArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) | 1496 static void floatArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
::Value>& info) |
1509 { | 1497 { |
1510 v8::Local<v8::Object> holder = info.Holder(); | 1498 v8::Local<v8::Object> holder = info.Holder(); |
1511 TestObject* impl = V8TestObject::toImpl(holder); | 1499 TestObject* impl = V8TestObject::toImpl(holder); |
1512 v8SetReturnValue(info, toV8(impl->floatArrayAttribute(), info.Holder(), info
.GetIsolate())); | 1500 v8SetReturnValue(info, toV8(impl->floatArrayAttribute(), info.Holder(), info
.GetIsolate())); |
1513 } | 1501 } |
1514 | 1502 |
1515 static void floatArrayAttributeAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1503 static void floatArrayAttributeAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1516 { | 1504 { |
1517 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); | 1505 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); |
1518 } | 1506 } |
1519 | 1507 |
1520 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 1508 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
1521 { | 1509 { |
1522 v8::Local<v8::Object> holder = info.Holder(); | 1510 v8::Local<v8::Object> holder = info.Holder(); |
1523 ExceptionState exceptionState(ExceptionState::SetterContext, "floatArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1511 ExceptionState exceptionState(ExceptionState::SetterContext, "floatArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); |
1524 TestObject* impl = V8TestObject::toImpl(holder); | 1512 TestObject* impl = V8TestObject::toImpl(holder); |
1525 Vector<float> cppValue = toImplArray<Vector<float>>(v8Value, 0, info.GetIsol
ate(), exceptionState); | 1513 Vector<float> cppValue = toImplArray<Vector<float>>(v8Value, 0, info.GetIsol
ate(), exceptionState); |
1526 if (exceptionState.throwIfNeeded()) | 1514 if (exceptionState.hadException()) |
1527 return; | 1515 return; |
1528 impl->setFloatArrayAttribute(cppValue); | 1516 impl->setFloatArrayAttribute(cppValue); |
1529 } | 1517 } |
1530 | 1518 |
1531 static void floatArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1519 static void floatArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1532 { | 1520 { |
1533 v8::Local<v8::Value> v8Value = info[0]; | 1521 v8::Local<v8::Value> v8Value = info[0]; |
1534 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); | 1522 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); |
1535 } | 1523 } |
1536 | 1524 |
1537 static void stringFrozenArrayAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 1525 static void stringFrozenArrayAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) |
1538 { | 1526 { |
1539 v8::Local<v8::Object> holder = info.Holder(); | 1527 v8::Local<v8::Object> holder = info.Holder(); |
1540 TestObject* impl = V8TestObject::toImpl(holder); | 1528 TestObject* impl = V8TestObject::toImpl(holder); |
1541 v8SetReturnValue(info, freezeV8Object(toV8(impl->stringFrozenArrayAttribute(
), info.Holder(), info.GetIsolate()), info.GetIsolate())); | 1529 v8SetReturnValue(info, freezeV8Object(toV8(impl->stringFrozenArrayAttribute(
), info.Holder(), info.GetIsolate()), info.GetIsolate())); |
1542 } | 1530 } |
1543 | 1531 |
1544 static void stringFrozenArrayAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 1532 static void stringFrozenArrayAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
1545 { | 1533 { |
1546 TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetter(info); | 1534 TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetter(info); |
1547 } | 1535 } |
1548 | 1536 |
1549 static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 1537 static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) |
1550 { | 1538 { |
1551 v8::Local<v8::Object> holder = info.Holder(); | 1539 v8::Local<v8::Object> holder = info.Holder(); |
1552 ExceptionState exceptionState(ExceptionState::SetterContext, "stringFrozenAr
rayAttribute", "TestObject", holder, info.GetIsolate()); | 1540 ExceptionState exceptionState(ExceptionState::SetterContext, "stringFrozenAr
rayAttribute", "TestObject", holder, info.GetIsolate()); |
1553 TestObject* impl = V8TestObject::toImpl(holder); | 1541 TestObject* impl = V8TestObject::toImpl(holder); |
1554 Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIs
olate(), exceptionState); | 1542 Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIs
olate(), exceptionState); |
1555 if (exceptionState.throwIfNeeded()) | 1543 if (exceptionState.hadException()) |
1556 return; | 1544 return; |
1557 impl->setStringFrozenArrayAttribute(cppValue); | 1545 impl->setStringFrozenArrayAttribute(cppValue); |
1558 } | 1546 } |
1559 | 1547 |
1560 static void stringFrozenArrayAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 1548 static void stringFrozenArrayAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
1561 { | 1549 { |
1562 v8::Local<v8::Value> v8Value = info[0]; | 1550 v8::Local<v8::Value> v8Value = info[0]; |
1563 TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetter(v8Value, inf
o); | 1551 TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetter(v8Value, inf
o); |
1564 } | 1552 } |
1565 | 1553 |
1566 static void testInterfaceEmptyFrozenArrayAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1554 static void testInterfaceEmptyFrozenArrayAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1567 { | 1555 { |
1568 v8::Local<v8::Object> holder = info.Holder(); | 1556 v8::Local<v8::Object> holder = info.Holder(); |
1569 TestObject* impl = V8TestObject::toImpl(holder); | 1557 TestObject* impl = V8TestObject::toImpl(holder); |
1570 v8SetReturnValue(info, freezeV8Object(toV8(impl->testInterfaceEmptyFrozenArr
ayAttribute(), info.Holder(), info.GetIsolate()), info.GetIsolate())); | 1558 v8SetReturnValue(info, freezeV8Object(toV8(impl->testInterfaceEmptyFrozenArr
ayAttribute(), info.Holder(), info.GetIsolate()), info.GetIsolate())); |
1571 } | 1559 } |
1572 | 1560 |
1573 static void testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 1561 static void testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
1574 { | 1562 { |
1575 TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetter(
info); | 1563 TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetter(
info); |
1576 } | 1564 } |
1577 | 1565 |
1578 static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 1566 static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
1579 { | 1567 { |
1580 v8::Local<v8::Object> holder = info.Holder(); | 1568 v8::Local<v8::Object> holder = info.Holder(); |
1581 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyFrozenArrayAttribute", "TestObject", holder, info.GetIsolate()); | 1569 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyFrozenArrayAttribute", "TestObject", holder, info.GetIsolate()); |
1582 TestObject* impl = V8TestObject::toImpl(holder); | 1570 TestObject* impl = V8TestObject::toImpl(holder); |
1583 HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestI
nterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); | 1571 HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestI
nterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); |
1584 if (exceptionState.throwIfNeeded()) | 1572 if (exceptionState.hadException()) |
1585 return; | 1573 return; |
1586 impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue); | 1574 impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue); |
1587 } | 1575 } |
1588 | 1576 |
1589 static void testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 1577 static void testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
1590 { | 1578 { |
1591 v8::Local<v8::Value> v8Value = info[0]; | 1579 v8::Local<v8::Value> v8Value = info[0]; |
1592 TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetter(
v8Value, info); | 1580 TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetter(
v8Value, info); |
1593 } | 1581 } |
1594 | 1582 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 { | 1625 { |
1638 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); | 1626 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); |
1639 } | 1627 } |
1640 | 1628 |
1641 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 1629 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
1642 { | 1630 { |
1643 v8::Local<v8::Object> holder = info.Holder(); | 1631 v8::Local<v8::Object> holder = info.Holder(); |
1644 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1632 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); |
1645 TestObject* impl = V8TestObject::toImpl(holder); | 1633 TestObject* impl = V8TestObject::toImpl(holder); |
1646 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 1634 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
1647 if (exceptionState.throwIfNeeded()) | 1635 if (exceptionState.hadException()) |
1648 return; | 1636 return; |
1649 impl->setLongOrNullAttribute(cppValue); | 1637 impl->setLongOrNullAttribute(cppValue); |
1650 } | 1638 } |
1651 | 1639 |
1652 static void longOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1640 static void longOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1653 { | 1641 { |
1654 v8::Local<v8::Value> v8Value = info[0]; | 1642 v8::Local<v8::Value> v8Value = info[0]; |
1655 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); | 1643 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); |
1656 } | 1644 } |
1657 | 1645 |
(...skipping 10 matching lines...) Expand all Loading... |
1668 } | 1656 } |
1669 | 1657 |
1670 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) | 1658 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) |
1671 { | 1659 { |
1672 v8::Local<v8::Object> holder = info.Holder(); | 1660 v8::Local<v8::Object> holder = info.Holder(); |
1673 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceO
rNullAttribute", "TestObject", holder, info.GetIsolate()); | 1661 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceO
rNullAttribute", "TestObject", holder, info.GetIsolate()); |
1674 TestObject* impl = V8TestObject::toImpl(holder); | 1662 TestObject* impl = V8TestObject::toImpl(holder); |
1675 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 1663 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
1676 if (!cppValue && !isUndefinedOrNull(v8Value)) { | 1664 if (!cppValue && !isUndefinedOrNull(v8Value)) { |
1677 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 1665 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
1678 exceptionState.throwIfNeeded(); | |
1679 return; | 1666 return; |
1680 } | 1667 } |
1681 impl->setTestInterfaceOrNullAttribute(cppValue); | 1668 impl->setTestInterfaceOrNullAttribute(cppValue); |
1682 } | 1669 } |
1683 | 1670 |
1684 static void testInterfaceOrNullAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 1671 static void testInterfaceOrNullAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
1685 { | 1672 { |
1686 v8::Local<v8::Value> v8Value = info[0]; | 1673 v8::Local<v8::Value> v8Value = info[0]; |
1687 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); | 1674 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); |
1688 } | 1675 } |
(...skipping 19 matching lines...) Expand all Loading... |
1708 if (!cppValue.prepare()) | 1695 if (!cppValue.prepare()) |
1709 return; | 1696 return; |
1710 const char* validValues[] = { | 1697 const char* validValues[] = { |
1711 "", | 1698 "", |
1712 "EnumValue1", | 1699 "EnumValue1", |
1713 "EnumValue2", | 1700 "EnumValue2", |
1714 "EnumValue3", | 1701 "EnumValue3", |
1715 }; | 1702 }; |
1716 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { | 1703 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { |
1717 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); | 1704 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
| 1705 // http://heycam.github.io/webidl/#idl-enums |
| 1706 // Assignment of an invalid string value to an attribute is ignored, |
| 1707 // while passing such a value as an operation argument results in |
| 1708 // an exception being thrown. |
| 1709 exceptionState.clearException(); |
1718 return; | 1710 return; |
1719 } | 1711 } |
1720 impl->setTestEnumAttribute(cppValue); | 1712 impl->setTestEnumAttribute(cppValue); |
1721 } | 1713 } |
1722 | 1714 |
1723 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 1715 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
1724 { | 1716 { |
1725 v8::Local<v8::Value> v8Value = info[0]; | 1717 v8::Local<v8::Value> v8Value = info[0]; |
1726 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); | 1718 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); |
1727 } | 1719 } |
(...skipping 19 matching lines...) Expand all Loading... |
1747 if (!cppValue.prepare()) | 1739 if (!cppValue.prepare()) |
1748 return; | 1740 return; |
1749 const char* validValues[] = { | 1741 const char* validValues[] = { |
1750 "", | 1742 "", |
1751 "EnumValue1", | 1743 "EnumValue1", |
1752 "EnumValue2", | 1744 "EnumValue2", |
1753 "EnumValue3", | 1745 "EnumValue3", |
1754 }; | 1746 }; |
1755 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { | 1747 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { |
1756 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); | 1748 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
| 1749 // http://heycam.github.io/webidl/#idl-enums |
| 1750 // Assignment of an invalid string value to an attribute is ignored, |
| 1751 // while passing such a value as an operation argument results in |
| 1752 // an exception being thrown. |
| 1753 exceptionState.clearException(); |
1757 return; | 1754 return; |
1758 } | 1755 } |
1759 impl->setTestEnumOrNullAttribute(cppValue); | 1756 impl->setTestEnumOrNullAttribute(cppValue); |
1760 } | 1757 } |
1761 | 1758 |
1762 static void testEnumOrNullAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 1759 static void testEnumOrNullAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
1763 { | 1760 { |
1764 v8::Local<v8::Value> v8Value = info[0]; | 1761 v8::Local<v8::Value> v8Value = info[0]; |
1765 TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info); | 1762 TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info); |
1766 } | 1763 } |
(...skipping 30 matching lines...) Expand all Loading... |
1797 static void staticLongAttributeAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1794 static void staticLongAttributeAttributeGetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1798 { | 1795 { |
1799 TestObjectV8Internal::staticLongAttributeAttributeGetter(info); | 1796 TestObjectV8Internal::staticLongAttributeAttributeGetter(info); |
1800 } | 1797 } |
1801 | 1798 |
1802 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) | 1799 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::FunctionCallbackInfo<v8::Value>& info) |
1803 { | 1800 { |
1804 v8::Local<v8::Object> holder = info.Holder(); | 1801 v8::Local<v8::Object> holder = info.Holder(); |
1805 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1802 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr
ibute", "TestObject", holder, info.GetIsolate()); |
1806 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 1803 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
1807 if (exceptionState.throwIfNeeded()) | 1804 if (exceptionState.hadException()) |
1808 return; | 1805 return; |
1809 TestObject::setStaticLongAttribute(cppValue); | 1806 TestObject::setStaticLongAttribute(cppValue); |
1810 } | 1807 } |
1811 | 1808 |
1812 static void staticLongAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 1809 static void staticLongAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
1813 { | 1810 { |
1814 v8::Local<v8::Value> v8Value = info[0]; | 1811 v8::Local<v8::Value> v8Value = info[0]; |
1815 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); | 1812 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); |
1816 } | 1813 } |
1817 | 1814 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 TestObjectV8Internal::doubleOrStringAttributeAttributeGetter(info); | 1853 TestObjectV8Internal::doubleOrStringAttributeAttributeGetter(info); |
1857 } | 1854 } |
1858 | 1855 |
1859 static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 1856 static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
1860 { | 1857 { |
1861 v8::Local<v8::Object> holder = info.Holder(); | 1858 v8::Local<v8::Object> holder = info.Holder(); |
1862 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
Attribute", "TestObject", holder, info.GetIsolate()); | 1859 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
Attribute", "TestObject", holder, info.GetIsolate()); |
1863 TestObject* impl = V8TestObject::toImpl(holder); | 1860 TestObject* impl = V8TestObject::toImpl(holder); |
1864 DoubleOrString cppValue; | 1861 DoubleOrString cppValue; |
1865 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv
ersionMode::NotNullable, exceptionState); | 1862 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv
ersionMode::NotNullable, exceptionState); |
1866 if (exceptionState.throwIfNeeded()) | 1863 if (exceptionState.hadException()) |
1867 return; | 1864 return; |
1868 impl->setDoubleOrStringAttribute(cppValue); | 1865 impl->setDoubleOrStringAttribute(cppValue); |
1869 } | 1866 } |
1870 | 1867 |
1871 static void doubleOrStringAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 1868 static void doubleOrStringAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
1872 { | 1869 { |
1873 v8::Local<v8::Value> v8Value = info[0]; | 1870 v8::Local<v8::Value> v8Value = info[0]; |
1874 TestObjectV8Internal::doubleOrStringAttributeAttributeSetter(v8Value, info); | 1871 TestObjectV8Internal::doubleOrStringAttributeAttributeSetter(v8Value, info); |
1875 } | 1872 } |
1876 | 1873 |
(...skipping 11 matching lines...) Expand all Loading... |
1888 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetter(info); | 1885 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetter(info); |
1889 } | 1886 } |
1890 | 1887 |
1891 static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 1888 static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
1892 { | 1889 { |
1893 v8::Local<v8::Object> holder = info.Holder(); | 1890 v8::Local<v8::Object> holder = info.Holder(); |
1894 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
OrNullAttribute", "TestObject", holder, info.GetIsolate()); | 1891 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
OrNullAttribute", "TestObject", holder, info.GetIsolate()); |
1895 TestObject* impl = V8TestObject::toImpl(holder); | 1892 TestObject* impl = V8TestObject::toImpl(holder); |
1896 DoubleOrString cppValue; | 1893 DoubleOrString cppValue; |
1897 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv
ersionMode::Nullable, exceptionState); | 1894 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv
ersionMode::Nullable, exceptionState); |
1898 if (exceptionState.throwIfNeeded()) | 1895 if (exceptionState.hadException()) |
1899 return; | 1896 return; |
1900 impl->setDoubleOrStringOrNullAttribute(cppValue); | 1897 impl->setDoubleOrStringOrNullAttribute(cppValue); |
1901 } | 1898 } |
1902 | 1899 |
1903 static void doubleOrStringOrNullAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 1900 static void doubleOrStringOrNullAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
1904 { | 1901 { |
1905 v8::Local<v8::Value> v8Value = info[0]; | 1902 v8::Local<v8::Value> v8Value = info[0]; |
1906 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetter(v8Value,
info); | 1903 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetter(v8Value,
info); |
1907 } | 1904 } |
1908 | 1905 |
(...skipping 11 matching lines...) Expand all Loading... |
1920 TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetter(info); | 1917 TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetter(info); |
1921 } | 1918 } |
1922 | 1919 |
1923 static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 1920 static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) |
1924 { | 1921 { |
1925 v8::Local<v8::Object> holder = info.Holder(); | 1922 v8::Local<v8::Object> holder = info.Holder(); |
1926 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrNullSt
ringAttribute", "TestObject", holder, info.GetIsolate()); | 1923 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrNullSt
ringAttribute", "TestObject", holder, info.GetIsolate()); |
1927 TestObject* impl = V8TestObject::toImpl(holder); | 1924 TestObject* impl = V8TestObject::toImpl(holder); |
1928 DoubleOrString cppValue; | 1925 DoubleOrString cppValue; |
1929 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTy
peConversionMode::Nullable, exceptionState); | 1926 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTy
peConversionMode::Nullable, exceptionState); |
1930 if (exceptionState.throwIfNeeded()) | 1927 if (exceptionState.hadException()) |
1931 return; | 1928 return; |
1932 impl->setDoubleOrNullStringAttribute(cppValue); | 1929 impl->setDoubleOrNullStringAttribute(cppValue); |
1933 } | 1930 } |
1934 | 1931 |
1935 static void doubleOrNullStringAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 1932 static void doubleOrNullStringAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
1936 { | 1933 { |
1937 v8::Local<v8::Value> v8Value = info[0]; | 1934 v8::Local<v8::Value> v8Value = info[0]; |
1938 TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetter(v8Value, in
fo); | 1935 TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetter(v8Value, in
fo); |
1939 } | 1936 } |
1940 | 1937 |
(...skipping 11 matching lines...) Expand all Loading... |
1952 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetter(info); | 1949 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetter(info); |
1953 } | 1950 } |
1954 | 1951 |
1955 static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 1952 static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
1956 { | 1953 { |
1957 v8::Local<v8::Object> holder = info.Holder(); | 1954 v8::Local<v8::Object> holder = info.Holder(); |
1958 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrString
SequenceAttribute", "TestObject", holder, info.GetIsolate()); | 1955 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrString
SequenceAttribute", "TestObject", holder, info.GetIsolate()); |
1959 TestObject* impl = V8TestObject::toImpl(holder); | 1956 TestObject* impl = V8TestObject::toImpl(holder); |
1960 StringOrStringSequence cppValue; | 1957 StringOrStringSequence cppValue; |
1961 V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, Union
TypeConversionMode::NotNullable, exceptionState); | 1958 V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, Union
TypeConversionMode::NotNullable, exceptionState); |
1962 if (exceptionState.throwIfNeeded()) | 1959 if (exceptionState.hadException()) |
1963 return; | 1960 return; |
1964 impl->setStringOrStringSequenceAttribute(cppValue); | 1961 impl->setStringOrStringSequenceAttribute(cppValue); |
1965 } | 1962 } |
1966 | 1963 |
1967 static void stringOrStringSequenceAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 1964 static void stringOrStringSequenceAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
1968 { | 1965 { |
1969 v8::Local<v8::Value> v8Value = info[0]; | 1966 v8::Local<v8::Value> v8Value = info[0]; |
1970 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetter(v8Value
, info); | 1967 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetter(v8Value
, info); |
1971 } | 1968 } |
1972 | 1969 |
(...skipping 11 matching lines...) Expand all Loading... |
1984 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetter(info); | 1981 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetter(info); |
1985 } | 1982 } |
1986 | 1983 |
1987 static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 1984 static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
1988 { | 1985 { |
1989 v8::Local<v8::Object> holder = info.Holder(); | 1986 v8::Local<v8::Object> holder = info.Holder(); |
1990 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrDoub
leAttribute", "TestObject", holder, info.GetIsolate()); | 1987 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrDoub
leAttribute", "TestObject", holder, info.GetIsolate()); |
1991 TestObject* impl = V8TestObject::toImpl(holder); | 1988 TestObject* impl = V8TestObject::toImpl(holder); |
1992 TestEnumOrDouble cppValue; | 1989 TestEnumOrDouble cppValue; |
1993 V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeCo
nversionMode::NotNullable, exceptionState); | 1990 V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeCo
nversionMode::NotNullable, exceptionState); |
1994 if (exceptionState.throwIfNeeded()) | 1991 if (exceptionState.hadException()) |
1995 return; | 1992 return; |
1996 impl->setTestEnumOrDoubleAttribute(cppValue); | 1993 impl->setTestEnumOrDoubleAttribute(cppValue); |
1997 } | 1994 } |
1998 | 1995 |
1999 static void testEnumOrDoubleAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 1996 static void testEnumOrDoubleAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
2000 { | 1997 { |
2001 v8::Local<v8::Value> v8Value = info[0]; | 1998 v8::Local<v8::Value> v8Value = info[0]; |
2002 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetter(v8Value, info
); | 1999 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetter(v8Value, info
); |
2003 } | 2000 } |
2004 | 2001 |
(...skipping 11 matching lines...) Expand all Loading... |
2016 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetter(inf
o); | 2013 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetter(inf
o); |
2017 } | 2014 } |
2018 | 2015 |
2019 static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2016 static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2020 { | 2017 { |
2021 v8::Local<v8::Object> holder = info.Holder(); | 2018 v8::Local<v8::Object> holder = info.Holder(); |
2022 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleOrStringAttribute", "TestObject", holder, info.GetIsolate()); | 2019 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleOrStringAttribute", "TestObject", holder, info.GetIsolate()); |
2023 TestObject* impl = V8TestObject::toImpl(holder); | 2020 TestObject* impl = V8TestObject::toImpl(holder); |
2024 UnrestrictedDoubleOrString cppValue; | 2021 UnrestrictedDoubleOrString cppValue; |
2025 V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, U
nionTypeConversionMode::NotNullable, exceptionState); | 2022 V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, U
nionTypeConversionMode::NotNullable, exceptionState); |
2026 if (exceptionState.throwIfNeeded()) | 2023 if (exceptionState.hadException()) |
2027 return; | 2024 return; |
2028 impl->setUnrestrictedDoubleOrStringAttribute(cppValue); | 2025 impl->setUnrestrictedDoubleOrStringAttribute(cppValue); |
2029 } | 2026 } |
2030 | 2027 |
2031 static void unrestrictedDoubleOrStringAttributeAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 2028 static void unrestrictedDoubleOrStringAttributeAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
2032 { | 2029 { |
2033 v8::Local<v8::Value> v8Value = info[0]; | 2030 v8::Local<v8::Value> v8Value = info[0]; |
2034 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetter(v8V
alue, info); | 2031 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetter(v8V
alue, info); |
2035 } | 2032 } |
2036 | 2033 |
(...skipping 12 matching lines...) Expand all Loading... |
2049 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); | 2046 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); |
2050 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); | 2047 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); |
2051 } | 2048 } |
2052 | 2049 |
2053 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2050 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2054 { | 2051 { |
2055 v8::Local<v8::Object> holder = info.Holder(); | 2052 v8::Local<v8::Object> holder = info.Holder(); |
2056 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2053 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2057 TestObject* impl = V8TestObject::toImpl(holder); | 2054 TestObject* impl = V8TestObject::toImpl(holder); |
2058 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2055 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2059 if (exceptionState.throwIfNeeded()) | 2056 if (exceptionState.hadException()) |
2060 return; | 2057 return; |
2061 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); | 2058 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); |
2062 } | 2059 } |
2063 | 2060 |
2064 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) | 2061 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) |
2065 { | 2062 { |
2066 v8::Local<v8::Value> v8Value = info[0]; | 2063 v8::Local<v8::Value> v8Value = info[0]; |
2067 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 2064 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
2068 V8PerContextData* contextData = scriptState->perContextData(); | 2065 V8PerContextData* contextData = scriptState->perContextData(); |
2069 if (contextData && contextData->activityLogger()) { | 2066 if (contextData && contextData->activityLogger()) { |
(...skipping 17 matching lines...) Expand all Loading... |
2087 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); | 2084 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); |
2088 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); | 2085 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); |
2089 } | 2086 } |
2090 | 2087 |
2091 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2088 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2092 { | 2089 { |
2093 v8::Local<v8::Object> holder = info.Holder(); | 2090 v8::Local<v8::Object> holder = info.Holder(); |
2094 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2091 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2095 TestObject* impl = V8TestObject::toImpl(holder); | 2092 TestObject* impl = V8TestObject::toImpl(holder); |
2096 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2093 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2097 if (exceptionState.throwIfNeeded()) | 2094 if (exceptionState.hadException()) |
2098 return; | 2095 return; |
2099 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); | 2096 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); |
2100 } | 2097 } |
2101 | 2098 |
2102 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) | 2099 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) |
2103 { | 2100 { |
2104 v8::Local<v8::Value> v8Value = info[0]; | 2101 v8::Local<v8::Value> v8Value = info[0]; |
2105 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 2102 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
2106 } | 2103 } |
2107 | 2104 |
2108 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) | 2105 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::FunctionCallbackInfo<v8::Value>& info) |
2109 { | 2106 { |
2110 v8::Local<v8::Object> holder = info.Holder(); | 2107 v8::Local<v8::Object> holder = info.Holder(); |
2111 TestObject* impl = V8TestObject::toImpl(holder); | 2108 TestObject* impl = V8TestObject::toImpl(holder); |
2112 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); | 2109 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); |
2113 } | 2110 } |
2114 | 2111 |
2115 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) | 2112 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) |
2116 { | 2113 { |
2117 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); | 2114 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); |
2118 } | 2115 } |
2119 | 2116 |
2120 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2117 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2121 { | 2118 { |
2122 v8::Local<v8::Object> holder = info.Holder(); | 2119 v8::Local<v8::Object> holder = info.Holder(); |
2123 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2120 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2124 TestObject* impl = V8TestObject::toImpl(holder); | 2121 TestObject* impl = V8TestObject::toImpl(holder); |
2125 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2122 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2126 if (exceptionState.throwIfNeeded()) | 2123 if (exceptionState.hadException()) |
2127 return; | 2124 return; |
2128 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); | 2125 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); |
2129 } | 2126 } |
2130 | 2127 |
2131 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) | 2128 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) |
2132 { | 2129 { |
2133 v8::Local<v8::Value> v8Value = info[0]; | 2130 v8::Local<v8::Value> v8Value = info[0]; |
2134 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 2131 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
2135 V8PerContextData* contextData = scriptState->perContextData(); | 2132 V8PerContextData* contextData = scriptState->perContextData(); |
2136 if (contextData && contextData->activityLogger()) { | 2133 if (contextData && contextData->activityLogger()) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2199 { | 2196 { |
2200 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); | 2197 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); |
2201 } | 2198 } |
2202 | 2199 |
2203 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 2200 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
2204 { | 2201 { |
2205 v8::Local<v8::Object> holder = info.Holder(); | 2202 v8::Local<v8::Object> holder = info.Holder(); |
2206 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); | 2203 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); |
2207 TestObject* impl = V8TestObject::toImpl(holder); | 2204 TestObject* impl = V8TestObject::toImpl(holder); |
2208 Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIs
olate(), exceptionState); | 2205 Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIs
olate(), exceptionState); |
2209 if (exceptionState.throwIfNeeded()) | 2206 if (exceptionState.hadException()) |
2210 return; | 2207 return; |
2211 impl->setCachedArrayAttribute(cppValue); | 2208 impl->setCachedArrayAttribute(cppValue); |
2212 V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), ho
lder, v8AtomicString(info.GetIsolate(), "cachedArrayAttribute")); // Invalidate
the cached value. | 2209 V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), ho
lder, v8AtomicString(info.GetIsolate(), "cachedArrayAttribute")); // Invalidate
the cached value. |
2213 } | 2210 } |
2214 | 2211 |
2215 static void cachedArrayAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 2212 static void cachedArrayAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
2216 { | 2213 { |
2217 v8::Local<v8::Value> v8Value = info[0]; | 2214 v8::Local<v8::Value> v8Value = info[0]; |
2218 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); | 2215 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); |
2219 } | 2216 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); | 2341 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); |
2345 } | 2342 } |
2346 | 2343 |
2347 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::FunctionCallbackInfo<v8::Value>& info) | 2344 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::FunctionCallbackInfo<v8::Value>& info) |
2348 { | 2345 { |
2349 v8::Local<v8::Object> holder = info.Holder(); | 2346 v8::Local<v8::Object> holder = info.Holder(); |
2350 TestObject* impl = V8TestObject::toImpl(holder); | 2347 TestObject* impl = V8TestObject::toImpl(holder); |
2351 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); | 2348 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); |
2352 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()
), WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), exception
State)) { | 2349 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()
), WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), exception
State)) { |
2353 v8SetReturnValueNull(info); | 2350 v8SetReturnValueNull(info); |
2354 exceptionState.throwIfNeeded(); | |
2355 return; | 2351 return; |
2356 } | 2352 } |
2357 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); | 2353 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); |
2358 } | 2354 } |
2359 | 2355 |
2360 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 2356 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
2361 { | 2357 { |
2362 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); | 2358 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); |
2363 } | 2359 } |
2364 | 2360 |
(...skipping 24 matching lines...) Expand all Loading... |
2389 { | 2385 { |
2390 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); | 2386 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); |
2391 } | 2387 } |
2392 | 2388 |
2393 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 2389 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
2394 { | 2390 { |
2395 v8::Local<v8::Object> holder = info.Holder(); | 2391 v8::Local<v8::Object> holder = info.Holder(); |
2396 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 2392 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
2397 TestObject* impl = V8TestObject::toImpl(holder); | 2393 TestObject* impl = V8TestObject::toImpl(holder); |
2398 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2394 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2399 if (exceptionState.throwIfNeeded()) | 2395 if (exceptionState.hadException()) |
2400 return; | 2396 return; |
2401 impl->setCustomGetterLongAttribute(cppValue); | 2397 impl->setCustomGetterLongAttribute(cppValue); |
2402 } | 2398 } |
2403 | 2399 |
2404 static void customGetterLongAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 2400 static void customGetterLongAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
2405 { | 2401 { |
2406 v8::Local<v8::Value> v8Value = info[0]; | 2402 v8::Local<v8::Value> v8Value = info[0]; |
2407 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); | 2403 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); |
2408 } | 2404 } |
2409 | 2405 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2454 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::LongAttribute); | 2450 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::LongAttribute); |
2455 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); | 2451 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); |
2456 } | 2452 } |
2457 | 2453 |
2458 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 2454 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
2459 { | 2455 { |
2460 v8::Local<v8::Object> holder = info.Holder(); | 2456 v8::Local<v8::Object> holder = info.Holder(); |
2461 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); | 2457 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); |
2462 TestObject* impl = V8TestObject::toImpl(holder); | 2458 TestObject* impl = V8TestObject::toImpl(holder); |
2463 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2459 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2464 if (exceptionState.throwIfNeeded()) | 2460 if (exceptionState.hadException()) |
2465 return; | 2461 return; |
2466 impl->setDeprecatedLongAttribute(cppValue); | 2462 impl->setDeprecatedLongAttribute(cppValue); |
2467 } | 2463 } |
2468 | 2464 |
2469 static void deprecatedLongAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 2465 static void deprecatedLongAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
2470 { | 2466 { |
2471 v8::Local<v8::Value> v8Value = info[0]; | 2467 v8::Local<v8::Value> v8Value = info[0]; |
2472 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::LongAttribute); | 2468 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::LongAttribute); |
2473 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); | 2469 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); |
2474 } | 2470 } |
2475 | 2471 |
2476 static void enforceRangeLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 2472 static void enforceRangeLongAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
2477 { | 2473 { |
2478 v8::Local<v8::Object> holder = info.Holder(); | 2474 v8::Local<v8::Object> holder = info.Holder(); |
2479 TestObject* impl = V8TestObject::toImpl(holder); | 2475 TestObject* impl = V8TestObject::toImpl(holder); |
2480 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); | 2476 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); |
2481 } | 2477 } |
2482 | 2478 |
2483 static void enforceRangeLongAttributeAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 2479 static void enforceRangeLongAttributeAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
2484 { | 2480 { |
2485 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); | 2481 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); |
2486 } | 2482 } |
2487 | 2483 |
2488 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 2484 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
2489 { | 2485 { |
2490 v8::Local<v8::Object> holder = info.Holder(); | 2486 v8::Local<v8::Object> holder = info.Holder(); |
2491 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 2487 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
2492 TestObject* impl = V8TestObject::toImpl(holder); | 2488 TestObject* impl = V8TestObject::toImpl(holder); |
2493 int cppValue = toInt32(info.GetIsolate(), v8Value, EnforceRange, exceptionSt
ate); | 2489 int cppValue = toInt32(info.GetIsolate(), v8Value, EnforceRange, exceptionSt
ate); |
2494 if (exceptionState.throwIfNeeded()) | 2490 if (exceptionState.hadException()) |
2495 return; | 2491 return; |
2496 impl->setEnforceRangeLongAttribute(cppValue); | 2492 impl->setEnforceRangeLongAttribute(cppValue); |
2497 } | 2493 } |
2498 | 2494 |
2499 static void enforceRangeLongAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 2495 static void enforceRangeLongAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
2500 { | 2496 { |
2501 v8::Local<v8::Value> v8Value = info[0]; | 2497 v8::Local<v8::Value> v8Value = info[0]; |
2502 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); | 2498 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); |
2503 } | 2499 } |
2504 | 2500 |
2505 static void implementedAsLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 2501 static void implementedAsLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) |
2506 { | 2502 { |
2507 v8::Local<v8::Object> holder = info.Holder(); | 2503 v8::Local<v8::Object> holder = info.Holder(); |
2508 TestObject* impl = V8TestObject::toImpl(holder); | 2504 TestObject* impl = V8TestObject::toImpl(holder); |
2509 v8SetReturnValueInt(info, impl->implementedAsName()); | 2505 v8SetReturnValueInt(info, impl->implementedAsName()); |
2510 } | 2506 } |
2511 | 2507 |
2512 static void implementedAsLongAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 2508 static void implementedAsLongAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
2513 { | 2509 { |
2514 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); | 2510 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); |
2515 } | 2511 } |
2516 | 2512 |
2517 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 2513 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) |
2518 { | 2514 { |
2519 v8::Local<v8::Object> holder = info.Holder(); | 2515 v8::Local<v8::Object> holder = info.Holder(); |
2520 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); | 2516 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); |
2521 TestObject* impl = V8TestObject::toImpl(holder); | 2517 TestObject* impl = V8TestObject::toImpl(holder); |
2522 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2518 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2523 if (exceptionState.throwIfNeeded()) | 2519 if (exceptionState.hadException()) |
2524 return; | 2520 return; |
2525 impl->setImplementedAsName(cppValue); | 2521 impl->setImplementedAsName(cppValue); |
2526 } | 2522 } |
2527 | 2523 |
2528 static void implementedAsLongAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 2524 static void implementedAsLongAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
2529 { | 2525 { |
2530 v8::Local<v8::Value> v8Value = info[0]; | 2526 v8::Local<v8::Value> v8Value = info[0]; |
2531 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); | 2527 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); |
2532 } | 2528 } |
2533 | 2529 |
(...skipping 12 matching lines...) Expand all Loading... |
2546 { | 2542 { |
2547 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); | 2543 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); |
2548 } | 2544 } |
2549 | 2545 |
2550 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2546 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2551 { | 2547 { |
2552 v8::Local<v8::Object> holder = info.Holder(); | 2548 v8::Local<v8::Object> holder = info.Holder(); |
2553 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2549 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2554 TestObject* impl = V8TestObject::toImpl(holder); | 2550 TestObject* impl = V8TestObject::toImpl(holder); |
2555 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2551 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2556 if (exceptionState.throwIfNeeded()) | 2552 if (exceptionState.hadException()) |
2557 return; | 2553 return; |
2558 impl->setImplementedAsNameWithCustomGetter(cppValue); | 2554 impl->setImplementedAsNameWithCustomGetter(cppValue); |
2559 } | 2555 } |
2560 | 2556 |
2561 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 2557 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
2562 { | 2558 { |
2563 v8::Local<v8::Value> v8Value = info[0]; | 2559 v8::Local<v8::Value> v8Value = info[0]; |
2564 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); | 2560 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); |
2565 } | 2561 } |
2566 | 2562 |
(...skipping 27 matching lines...) Expand all Loading... |
2594 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); | 2590 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); |
2595 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); | 2591 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); |
2596 } | 2592 } |
2597 | 2593 |
2598 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 2594 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
2599 { | 2595 { |
2600 v8::Local<v8::Object> holder = info.Holder(); | 2596 v8::Local<v8::Object> holder = info.Holder(); |
2601 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); | 2597 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); |
2602 TestObject* impl = V8TestObject::toImpl(holder); | 2598 TestObject* impl = V8TestObject::toImpl(holder); |
2603 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2599 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2604 if (exceptionState.throwIfNeeded()) | 2600 if (exceptionState.hadException()) |
2605 return; | 2601 return; |
2606 impl->setMeasureAsLongAttribute(cppValue); | 2602 impl->setMeasureAsLongAttribute(cppValue); |
2607 } | 2603 } |
2608 | 2604 |
2609 static void measureAsLongAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 2605 static void measureAsLongAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
2610 { | 2606 { |
2611 v8::Local<v8::Value> v8Value = info[0]; | 2607 v8::Local<v8::Value> v8Value = info[0]; |
2612 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); | 2608 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); |
2613 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); | 2609 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); |
2614 } | 2610 } |
2615 | 2611 |
2616 static void notEnumerableLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 2612 static void notEnumerableLongAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) |
2617 { | 2613 { |
2618 v8::Local<v8::Object> holder = info.Holder(); | 2614 v8::Local<v8::Object> holder = info.Holder(); |
2619 TestObject* impl = V8TestObject::toImpl(holder); | 2615 TestObject* impl = V8TestObject::toImpl(holder); |
2620 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); | 2616 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); |
2621 } | 2617 } |
2622 | 2618 |
2623 static void notEnumerableLongAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 2619 static void notEnumerableLongAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
2624 { | 2620 { |
2625 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); | 2621 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); |
2626 } | 2622 } |
2627 | 2623 |
2628 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 2624 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) |
2629 { | 2625 { |
2630 v8::Local<v8::Object> holder = info.Holder(); | 2626 v8::Local<v8::Object> holder = info.Holder(); |
2631 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); | 2627 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); |
2632 TestObject* impl = V8TestObject::toImpl(holder); | 2628 TestObject* impl = V8TestObject::toImpl(holder); |
2633 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2629 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2634 if (exceptionState.throwIfNeeded()) | 2630 if (exceptionState.hadException()) |
2635 return; | 2631 return; |
2636 impl->setNotEnumerableLongAttribute(cppValue); | 2632 impl->setNotEnumerableLongAttribute(cppValue); |
2637 } | 2633 } |
2638 | 2634 |
2639 static void notEnumerableLongAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 2635 static void notEnumerableLongAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
2640 { | 2636 { |
2641 v8::Local<v8::Value> v8Value = info[0]; | 2637 v8::Local<v8::Value> v8Value = info[0]; |
2642 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); | 2638 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); |
2643 } | 2639 } |
2644 | 2640 |
2645 static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 2641 static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
2646 { | 2642 { |
2647 v8::Local<v8::Object> holder = info.Holder(); | 2643 v8::Local<v8::Object> holder = info.Holder(); |
2648 TestObject* impl = V8TestObject::toImpl(holder); | 2644 TestObject* impl = V8TestObject::toImpl(holder); |
2649 v8SetReturnValueInt(info, impl->originTrialEnabledLongAttribute()); | 2645 v8SetReturnValueInt(info, impl->originTrialEnabledLongAttribute()); |
2650 } | 2646 } |
2651 | 2647 |
2652 static void originTrialEnabledLongAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 2648 static void originTrialEnabledLongAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
2653 { | 2649 { |
2654 TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetter(info); | 2650 TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetter(info); |
2655 } | 2651 } |
2656 | 2652 |
2657 static void originTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2653 static void originTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2658 { | 2654 { |
2659 v8::Local<v8::Object> holder = info.Holder(); | 2655 v8::Local<v8::Object> holder = info.Holder(); |
2660 ExceptionState exceptionState(ExceptionState::SetterContext, "originTrialEna
bledLongAttribute", "TestObject", holder, info.GetIsolate()); | 2656 ExceptionState exceptionState(ExceptionState::SetterContext, "originTrialEna
bledLongAttribute", "TestObject", holder, info.GetIsolate()); |
2661 TestObject* impl = V8TestObject::toImpl(holder); | 2657 TestObject* impl = V8TestObject::toImpl(holder); |
2662 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2658 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2663 if (exceptionState.throwIfNeeded()) | 2659 if (exceptionState.hadException()) |
2664 return; | 2660 return; |
2665 impl->setOriginTrialEnabledLongAttribute(cppValue); | 2661 impl->setOriginTrialEnabledLongAttribute(cppValue); |
2666 } | 2662 } |
2667 | 2663 |
2668 static void originTrialEnabledLongAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 2664 static void originTrialEnabledLongAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
2669 { | 2665 { |
2670 v8::Local<v8::Value> v8Value = info[0]; | 2666 v8::Local<v8::Value> v8Value = info[0]; |
2671 TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetter(v8Value
, info); | 2667 TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetter(v8Value
, info); |
2672 } | 2668 } |
2673 | 2669 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2720 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | 2716 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); |
2721 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | 2717 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); |
2722 } | 2718 } |
2723 | 2719 |
2724 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2720 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2725 { | 2721 { |
2726 v8::Local<v8::Object> holder = info.Holder(); | 2722 v8::Local<v8::Object> holder = info.Holder(); |
2727 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2723 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2728 TestObject* impl = V8TestObject::toImpl(holder); | 2724 TestObject* impl = V8TestObject::toImpl(holder); |
2729 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2725 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2730 if (exceptionState.throwIfNeeded()) | 2726 if (exceptionState.hadException()) |
2731 return; | 2727 return; |
2732 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2728 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
2733 } | 2729 } |
2734 | 2730 |
2735 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(const v8::FunctionCallbackInfo<v8::Value>& info) | 2731 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(const v8::FunctionCallbackInfo<v8::Value>& info) |
2736 { | 2732 { |
2737 v8::Local<v8::Value> v8Value = info[0]; | 2733 v8::Local<v8::Value> v8Value = info[0]; |
2738 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 2734 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
2739 V8PerContextData* contextData = scriptState->perContextData(); | 2735 V8PerContextData* contextData = scriptState->perContextData(); |
2740 if (contextData && contextData->activityLogger()) { | 2736 if (contextData && contextData->activityLogger()) { |
(...skipping 17 matching lines...) Expand all Loading... |
2758 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | 2754 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); |
2759 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | 2755 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); |
2760 } | 2756 } |
2761 | 2757 |
2762 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) | 2758 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) |
2763 { | 2759 { |
2764 v8::Local<v8::Object> holder = info.Holder(); | 2760 v8::Local<v8::Object> holder = info.Holder(); |
2765 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2761 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2766 TestObject* impl = V8TestObject::toImpl(holder); | 2762 TestObject* impl = V8TestObject::toImpl(holder); |
2767 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2763 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2768 if (exceptionState.throwIfNeeded()) | 2764 if (exceptionState.hadException()) |
2769 return; | 2765 return; |
2770 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2766 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
2771 } | 2767 } |
2772 | 2768 |
2773 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 2769 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
2774 { | 2770 { |
2775 v8::Local<v8::Value> v8Value = info[0]; | 2771 v8::Local<v8::Value> v8Value = info[0]; |
2776 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 2772 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
2777 V8PerContextData* contextData = scriptState->perContextData(); | 2773 V8PerContextData* contextData = scriptState->perContextData(); |
2778 if (contextData && contextData->activityLogger()) { | 2774 if (contextData && contextData->activityLogger()) { |
(...skipping 17 matching lines...) Expand all Loading... |
2796 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2792 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); |
2797 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | 2793 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); |
2798 } | 2794 } |
2799 | 2795 |
2800 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) | 2796 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) |
2801 { | 2797 { |
2802 v8::Local<v8::Object> holder = info.Holder(); | 2798 v8::Local<v8::Object> holder = info.Holder(); |
2803 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2799 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
2804 TestObject* impl = V8TestObject::toImpl(holder); | 2800 TestObject* impl = V8TestObject::toImpl(holder); |
2805 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2801 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2806 if (exceptionState.throwIfNeeded()) | 2802 if (exceptionState.hadException()) |
2807 return; | 2803 return; |
2808 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2804 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
2809 } | 2805 } |
2810 | 2806 |
2811 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 2807 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
2812 { | 2808 { |
2813 v8::Local<v8::Value> v8Value = info[0]; | 2809 v8::Local<v8::Value> v8Value = info[0]; |
2814 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 2810 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
2815 V8PerContextData* contextData = scriptState->perContextData(); | 2811 V8PerContextData* contextData = scriptState->perContextData(); |
2816 if (contextData && contextData->activityLogger()) { | 2812 if (contextData && contextData->activityLogger()) { |
(...skipping 13 matching lines...) Expand all Loading... |
2830 { | 2826 { |
2831 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | 2827 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); |
2832 } | 2828 } |
2833 | 2829 |
2834 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) | 2830 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) |
2835 { | 2831 { |
2836 v8::Local<v8::Object> holder = info.Holder(); | 2832 v8::Local<v8::Object> holder = info.Holder(); |
2837 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2833 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
2838 TestObject* impl = V8TestObject::toImpl(holder); | 2834 TestObject* impl = V8TestObject::toImpl(holder); |
2839 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2835 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2840 if (exceptionState.throwIfNeeded()) | 2836 if (exceptionState.hadException()) |
2841 return; | 2837 return; |
2842 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2838 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
2843 } | 2839 } |
2844 | 2840 |
2845 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 2841 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
2846 { | 2842 { |
2847 v8::Local<v8::Value> v8Value = info[0]; | 2843 v8::Local<v8::Value> v8Value = info[0]; |
2848 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | 2844 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); |
2849 } | 2845 } |
2850 | 2846 |
(...skipping 12 matching lines...) Expand all Loading... |
2863 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | 2859 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); |
2864 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | 2860 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); |
2865 } | 2861 } |
2866 | 2862 |
2867 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2863 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
2868 { | 2864 { |
2869 v8::Local<v8::Object> holder = info.Holder(); | 2865 v8::Local<v8::Object> holder = info.Holder(); |
2870 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2866 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2871 TestObject* impl = V8TestObject::toImpl(holder); | 2867 TestObject* impl = V8TestObject::toImpl(holder); |
2872 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2868 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2873 if (exceptionState.throwIfNeeded()) | 2869 if (exceptionState.hadException()) |
2874 return; | 2870 return; |
2875 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 2871 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
2876 } | 2872 } |
2877 | 2873 |
2878 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(const v8::FunctionCallbackInfo<v8::Value>& info) | 2874 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(const v8::FunctionCallbackInfo<v8::Value>& info) |
2879 { | 2875 { |
2880 v8::Local<v8::Value> v8Value = info[0]; | 2876 v8::Local<v8::Value> v8Value = info[0]; |
2881 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | 2877 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); |
2882 } | 2878 } |
2883 | 2879 |
(...skipping 12 matching lines...) Expand all Loading... |
2896 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | 2892 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); |
2897 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | 2893 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); |
2898 } | 2894 } |
2899 | 2895 |
2900 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) | 2896 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value
>& info) |
2901 { | 2897 { |
2902 v8::Local<v8::Object> holder = info.Holder(); | 2898 v8::Local<v8::Object> holder = info.Holder(); |
2903 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2899 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
2904 TestObject* impl = V8TestObject::toImpl(holder); | 2900 TestObject* impl = V8TestObject::toImpl(holder); |
2905 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2901 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2906 if (exceptionState.throwIfNeeded()) | 2902 if (exceptionState.hadException()) |
2907 return; | 2903 return; |
2908 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 2904 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
2909 } | 2905 } |
2910 | 2906 |
2911 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 2907 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
2912 { | 2908 { |
2913 v8::Local<v8::Value> v8Value = info[0]; | 2909 v8::Local<v8::Value> v8Value = info[0]; |
2914 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | 2910 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); |
2915 } | 2911 } |
2916 | 2912 |
(...skipping 12 matching lines...) Expand all Loading... |
2929 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2925 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); |
2930 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | 2926 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); |
2931 } | 2927 } |
2932 | 2928 |
2933 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) | 2929 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::
Value>& info) |
2934 { | 2930 { |
2935 v8::Local<v8::Object> holder = info.Holder(); | 2931 v8::Local<v8::Object> holder = info.Holder(); |
2936 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2932 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
2937 TestObject* impl = V8TestObject::toImpl(holder); | 2933 TestObject* impl = V8TestObject::toImpl(holder); |
2938 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2934 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2939 if (exceptionState.throwIfNeeded()) | 2935 if (exceptionState.hadException()) |
2940 return; | 2936 return; |
2941 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2937 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
2942 } | 2938 } |
2943 | 2939 |
2944 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 2940 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
2945 { | 2941 { |
2946 v8::Local<v8::Value> v8Value = info[0]; | 2942 v8::Local<v8::Value> v8Value = info[0]; |
2947 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | 2943 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); |
2948 } | 2944 } |
2949 | 2945 |
2950 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 2946 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
2951 { | 2947 { |
2952 v8::Local<v8::Object> holder = info.Holder(); | 2948 v8::Local<v8::Object> holder = info.Holder(); |
2953 TestObject* impl = V8TestObject::toImpl(holder); | 2949 TestObject* impl = V8TestObject::toImpl(holder); |
2954 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 2950 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
2955 } | 2951 } |
2956 | 2952 |
2957 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 2953 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
2958 { | 2954 { |
2959 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | 2955 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); |
2960 } | 2956 } |
2961 | 2957 |
2962 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) | 2958 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallb
ackInfo<v8::Value>& info) |
2963 { | 2959 { |
2964 v8::Local<v8::Object> holder = info.Holder(); | 2960 v8::Local<v8::Object> holder = info.Holder(); |
2965 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2961 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
2966 TestObject* impl = V8TestObject::toImpl(holder); | 2962 TestObject* impl = V8TestObject::toImpl(holder); |
2967 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 2963 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
2968 if (exceptionState.throwIfNeeded()) | 2964 if (exceptionState.hadException()) |
2969 return; | 2965 return; |
2970 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2966 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
2971 } | 2967 } |
2972 | 2968 |
2973 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 2969 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
2974 { | 2970 { |
2975 v8::Local<v8::Value> v8Value = info[0]; | 2971 v8::Local<v8::Value> v8Value = info[0]; |
2976 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | 2972 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); |
2977 } | 2973 } |
2978 | 2974 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3024 v8::Local<v8::Object> holder = info.Holder(); | 3020 v8::Local<v8::Object> holder = info.Holder(); |
3025 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); | 3021 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); |
3026 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3022 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
3027 TestNode* impl = WTF::getPtr(proxyImpl->locationWithException()); | 3023 TestNode* impl = WTF::getPtr(proxyImpl->locationWithException()); |
3028 if (!impl) | 3024 if (!impl) |
3029 return; | 3025 return; |
3030 V8StringResource<> cppValue = v8Value; | 3026 V8StringResource<> cppValue = v8Value; |
3031 if (!cppValue.prepare()) | 3027 if (!cppValue.prepare()) |
3032 return; | 3028 return; |
3033 impl->setHrefThrows(cppValue, exceptionState); | 3029 impl->setHrefThrows(cppValue, exceptionState); |
3034 exceptionState.throwIfNeeded(); | |
3035 } | 3030 } |
3036 | 3031 |
3037 static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3032 static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
3038 { | 3033 { |
3039 v8::Local<v8::Value> v8Value = info[0]; | 3034 v8::Local<v8::Value> v8Value = info[0]; |
3040 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); | 3035 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); |
3041 } | 3036 } |
3042 | 3037 |
3043 static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) | 3038 static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) |
3044 { | 3039 { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3086 | 3081 |
3087 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 3082 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
3088 { | 3083 { |
3089 v8::Local<v8::Object> holder = info.Holder(); | 3084 v8::Local<v8::Object> holder = info.Holder(); |
3090 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); | 3085 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); |
3091 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3086 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
3092 TestNode* impl = WTF::getPtr(proxyImpl->locationByteString()); | 3087 TestNode* impl = WTF::getPtr(proxyImpl->locationByteString()); |
3093 if (!impl) | 3088 if (!impl) |
3094 return; | 3089 return; |
3095 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); | 3090 V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, excep
tionState); |
3096 if (exceptionState.throwIfNeeded()) | 3091 if (exceptionState.hadException()) |
3097 return; | 3092 return; |
3098 impl->setHrefByteString(cppValue); | 3093 impl->setHrefByteString(cppValue); |
3099 } | 3094 } |
3100 | 3095 |
3101 static void locationByteStringAttributeSetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 3096 static void locationByteStringAttributeSetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
3102 { | 3097 { |
3103 v8::Local<v8::Value> v8Value = info[0]; | 3098 v8::Local<v8::Value> v8Value = info[0]; |
3104 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); | 3099 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); |
3105 } | 3100 } |
3106 | 3101 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3218 { | 3213 { |
3219 v8::Local<v8::Object> holder = info.Holder(); | 3214 v8::Local<v8::Object> holder = info.Holder(); |
3220 ExceptionState exceptionState(ExceptionState::SetterContext, "locationGarbag
eCollected", "TestObject", holder, info.GetIsolate()); | 3215 ExceptionState exceptionState(ExceptionState::SetterContext, "locationGarbag
eCollected", "TestObject", holder, info.GetIsolate()); |
3221 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3216 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
3222 TestInterfaceGarbageCollected* impl = WTF::getPtr(proxyImpl->locationGarbage
Collected()); | 3217 TestInterfaceGarbageCollected* impl = WTF::getPtr(proxyImpl->locationGarbage
Collected()); |
3223 if (!impl) | 3218 if (!impl) |
3224 return; | 3219 return; |
3225 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 3220 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
3226 if (!cppValue) { | 3221 if (!cppValue) { |
3227 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); | 3222 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); |
3228 exceptionState.throwIfNeeded(); | |
3229 return; | 3223 return; |
3230 } | 3224 } |
3231 impl->setAttr1(cppValue); | 3225 impl->setAttr1(cppValue); |
3232 } | 3226 } |
3233 | 3227 |
3234 static void locationGarbageCollectedAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 3228 static void locationGarbageCollectedAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
3235 { | 3229 { |
3236 v8::Local<v8::Value> v8Value = info[0]; | 3230 v8::Local<v8::Value> v8Value = info[0]; |
3237 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; | 3231 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; |
3238 } | 3232 } |
3239 | 3233 |
3240 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3234 static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
3241 { | 3235 { |
3242 v8::Local<v8::Object> holder = info.Holder(); | 3236 v8::Local<v8::Object> holder = info.Holder(); |
3243 TestObject* impl = V8TestObject::toImpl(holder); | 3237 TestObject* impl = V8TestObject::toImpl(holder); |
3244 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | 3238 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); |
3245 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); | 3239 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
3246 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3240 if (UNLIKELY(exceptionState.hadException())) |
3247 return; | 3241 return; |
3248 v8SetReturnValueInt(info, cppValue); | 3242 v8SetReturnValueInt(info, cppValue); |
3249 } | 3243 } |
3250 | 3244 |
3251 static void raisesExceptionLongAttributeAttributeGetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 3245 static void raisesExceptionLongAttributeAttributeGetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
3252 { | 3246 { |
3253 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); | 3247 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); |
3254 } | 3248 } |
3255 | 3249 |
3256 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) | 3250 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) |
3257 { | 3251 { |
3258 v8::Local<v8::Object> holder = info.Holder(); | 3252 v8::Local<v8::Object> holder = info.Holder(); |
3259 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | 3253 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); |
3260 TestObject* impl = V8TestObject::toImpl(holder); | 3254 TestObject* impl = V8TestObject::toImpl(holder); |
3261 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 3255 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
3262 if (exceptionState.throwIfNeeded()) | 3256 if (exceptionState.hadException()) |
3263 return; | 3257 return; |
3264 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); | 3258 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); |
3265 exceptionState.throwIfNeeded(); | |
3266 } | 3259 } |
3267 | 3260 |
3268 static void raisesExceptionLongAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 3261 static void raisesExceptionLongAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
3269 { | 3262 { |
3270 v8::Local<v8::Value> v8Value = info[0]; | 3263 v8::Local<v8::Value> v8Value = info[0]; |
3271 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); | 3264 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); |
3272 } | 3265 } |
3273 | 3266 |
3274 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Function
CallbackInfo<v8::Value>& info) | 3267 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Function
CallbackInfo<v8::Value>& info) |
3275 { | 3268 { |
3276 v8::Local<v8::Object> holder = info.Holder(); | 3269 v8::Local<v8::Object> holder = info.Holder(); |
3277 TestObject* impl = V8TestObject::toImpl(holder); | 3270 TestObject* impl = V8TestObject::toImpl(holder); |
3278 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | 3271 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
3279 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); | 3272 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); |
3280 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3273 if (UNLIKELY(exceptionState.hadException())) |
3281 return; | 3274 return; |
3282 v8SetReturnValueInt(info, cppValue); | 3275 v8SetReturnValueInt(info, cppValue); |
3283 } | 3276 } |
3284 | 3277 |
3285 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3278 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
3286 { | 3279 { |
3287 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); | 3280 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); |
3288 } | 3281 } |
3289 | 3282 |
3290 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3283 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3291 { | 3284 { |
3292 v8::Local<v8::Object> holder = info.Holder(); | 3285 v8::Local<v8::Object> holder = info.Holder(); |
3293 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | 3286 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
3294 TestObject* impl = V8TestObject::toImpl(holder); | 3287 TestObject* impl = V8TestObject::toImpl(holder); |
3295 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 3288 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
3296 if (exceptionState.throwIfNeeded()) | 3289 if (exceptionState.hadException()) |
3297 return; | 3290 return; |
3298 impl->setRaisesExceptionGetterLongAttribute(cppValue); | 3291 impl->setRaisesExceptionGetterLongAttribute(cppValue); |
3299 } | 3292 } |
3300 | 3293 |
3301 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3294 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
3302 { | 3295 { |
3303 v8::Local<v8::Value> v8Value = info[0]; | 3296 v8::Local<v8::Value> v8Value = info[0]; |
3304 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); | 3297 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); |
3305 } | 3298 } |
3306 | 3299 |
3307 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Function
CallbackInfo<v8::Value>& info) | 3300 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Function
CallbackInfo<v8::Value>& info) |
3308 { | 3301 { |
3309 v8::Local<v8::Object> holder = info.Holder(); | 3302 v8::Local<v8::Object> holder = info.Holder(); |
3310 TestObject* impl = V8TestObject::toImpl(holder); | 3303 TestObject* impl = V8TestObject::toImpl(holder); |
3311 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); | 3304 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); |
3312 } | 3305 } |
3313 | 3306 |
3314 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3307 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
3315 { | 3308 { |
3316 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); | 3309 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); |
3317 } | 3310 } |
3318 | 3311 |
3319 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3312 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3320 { | 3313 { |
3321 v8::Local<v8::Object> holder = info.Holder(); | 3314 v8::Local<v8::Object> holder = info.Holder(); |
3322 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); | 3315 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
3323 TestObject* impl = V8TestObject::toImpl(holder); | 3316 TestObject* impl = V8TestObject::toImpl(holder); |
3324 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 3317 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
3325 if (exceptionState.throwIfNeeded()) | 3318 if (exceptionState.hadException()) |
3326 return; | 3319 return; |
3327 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); | 3320 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); |
3328 exceptionState.throwIfNeeded(); | |
3329 } | 3321 } |
3330 | 3322 |
3331 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3323 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
3332 { | 3324 { |
3333 v8::Local<v8::Value> v8Value = info[0]; | 3325 v8::Local<v8::Value> v8Value = info[0]; |
3334 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); | 3326 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); |
3335 } | 3327 } |
3336 | 3328 |
3337 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) | 3329 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) |
3338 { | 3330 { |
3339 v8::Local<v8::Object> holder = info.Holder(); | 3331 v8::Local<v8::Object> holder = info.Holder(); |
3340 TestObject* impl = V8TestObject::toImpl(holder); | 3332 TestObject* impl = V8TestObject::toImpl(holder); |
3341 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3333 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
3342 TestInterfaceEmpty* cppValue(impl->raisesExceptionTestInterfaceEmptyAttribut
e(exceptionState)); | 3334 TestInterfaceEmpty* cppValue(impl->raisesExceptionTestInterfaceEmptyAttribut
e(exceptionState)); |
3343 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3335 if (UNLIKELY(exceptionState.hadException())) |
3344 return; | 3336 return; |
3345 v8SetReturnValueFast(info, cppValue, impl); | 3337 v8SetReturnValueFast(info, cppValue, impl); |
3346 } | 3338 } |
3347 | 3339 |
3348 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3340 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
3349 { | 3341 { |
3350 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); | 3342 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); |
3351 } | 3343 } |
3352 | 3344 |
3353 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3345 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3354 { | 3346 { |
3355 v8::Local<v8::Object> holder = info.Holder(); | 3347 v8::Local<v8::Object> holder = info.Holder(); |
3356 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3348 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
3357 TestObject* impl = V8TestObject::toImpl(holder); | 3349 TestObject* impl = V8TestObject::toImpl(holder); |
3358 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 3350 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
3359 if (!cppValue) { | 3351 if (!cppValue) { |
3360 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); | 3352 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceEmpty'."); |
3361 exceptionState.throwIfNeeded(); | |
3362 return; | 3353 return; |
3363 } | 3354 } |
3364 impl->setRaisesExceptionTestInterfaceEmptyAttribute(cppValue, exceptionState
); | 3355 impl->setRaisesExceptionTestInterfaceEmptyAttribute(cppValue, exceptionState
); |
3365 exceptionState.throwIfNeeded(); | |
3366 } | 3356 } |
3367 | 3357 |
3368 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3358 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
3369 { | 3359 { |
3370 v8::Local<v8::Value> v8Value = info[0]; | 3360 v8::Local<v8::Value> v8Value = info[0]; |
3371 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); | 3361 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); |
3372 } | 3362 } |
3373 | 3363 |
3374 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 3364 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
3375 { | 3365 { |
3376 v8::Local<v8::Object> holder = info.Holder(); | 3366 v8::Local<v8::Object> holder = info.Holder(); |
3377 TestObject* impl = V8TestObject::toImpl(holder); | 3367 TestObject* impl = V8TestObject::toImpl(holder); |
3378 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeRaisesExceptionGetterAnyAttribute"); | 3368 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeRaisesExceptionGetterAnyAttribute"); |
3379 if (!impl->isValueDirty()) { | 3369 if (!impl->isValueDirty()) { |
3380 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(ScriptState
::current(info.GetIsolate()), holder, propertyName); | 3370 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(ScriptState
::current(info.GetIsolate()), holder, propertyName); |
3381 if (!v8Value.IsEmpty() && !v8Value->IsUndefined()) { | 3371 if (!v8Value.IsEmpty() && !v8Value->IsUndefined()) { |
3382 v8SetReturnValue(info, v8Value); | 3372 v8SetReturnValue(info, v8Value); |
3383 return; | 3373 return; |
3384 } | 3374 } |
3385 } | 3375 } |
3386 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3376 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
3387 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); | 3377 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); |
3388 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3378 if (UNLIKELY(exceptionState.hadException())) |
3389 return; | 3379 return; |
3390 v8::Local<v8::Value> v8Value(cppValue.v8Value()); | 3380 v8::Local<v8::Value> v8Value(cppValue.v8Value()); |
3391 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holde
r, propertyName, v8Value); | 3381 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holde
r, propertyName, v8Value); |
3392 v8SetReturnValue(info, v8Value); | 3382 v8SetReturnValue(info, v8Value); |
3393 } | 3383 } |
3394 | 3384 |
3395 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 3385 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
3396 { | 3386 { |
3397 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); | 3387 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); |
3398 } | 3388 } |
3399 | 3389 |
3400 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3390 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3401 { | 3391 { |
3402 v8::Local<v8::Object> holder = info.Holder(); | 3392 v8::Local<v8::Object> holder = info.Holder(); |
3403 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3393 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
3404 TestObject* impl = V8TestObject::toImpl(holder); | 3394 TestObject* impl = V8TestObject::toImpl(holder); |
3405 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 3395 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
3406 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); | 3396 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); |
3407 exceptionState.throwIfNeeded(); | |
3408 V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), ho
lder, v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAny
Attribute")); // Invalidate the cached value. | 3397 V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), ho
lder, v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAny
Attribute")); // Invalidate the cached value. |
3409 } | 3398 } |
3410 | 3399 |
3411 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 3400 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
3412 { | 3401 { |
3413 v8::Local<v8::Value> v8Value = info[0]; | 3402 v8::Local<v8::Value> v8Value = info[0]; |
3414 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); | 3403 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); |
3415 } | 3404 } |
3416 | 3405 |
3417 static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3406 static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
3418 { | 3407 { |
3419 v8::Local<v8::Object> holder = info.Holder(); | 3408 v8::Local<v8::Object> holder = info.Holder(); |
3420 TestObject* impl = V8TestObject::toImpl(holder); | 3409 TestObject* impl = V8TestObject::toImpl(holder); |
3421 v8SetReturnValueFast(info, impl->fastGetAttribute(HTMLNames::reflecttestinte
rfaceattributeAttr), impl); | 3410 v8SetReturnValueFast(info, impl->fastGetAttribute(HTMLNames::reflecttestinte
rfaceattributeAttr), impl); |
3422 } | 3411 } |
3423 | 3412 |
3424 static void reflectTestInterfaceAttributeAttributeGetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3413 static void reflectTestInterfaceAttributeAttributeGetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
3425 { | 3414 { |
3426 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); | 3415 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); |
3427 } | 3416 } |
3428 | 3417 |
3429 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3418 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3430 { | 3419 { |
3431 v8::Local<v8::Object> holder = info.Holder(); | 3420 v8::Local<v8::Object> holder = info.Holder(); |
3432 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectTestInt
erfaceAttribute", "TestObject", holder, info.GetIsolate()); | 3421 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectTestInt
erfaceAttribute", "TestObject", holder, info.GetIsolate()); |
3433 TestObject* impl = V8TestObject::toImpl(holder); | 3422 TestObject* impl = V8TestObject::toImpl(holder); |
3434 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 3423 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
3435 if (!cppValue) { | 3424 if (!cppValue) { |
3436 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 3425 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
3437 exceptionState.throwIfNeeded(); | |
3438 return; | 3426 return; |
3439 } | 3427 } |
3440 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3428 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3441 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, cppValue); | 3429 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, cppValue); |
3442 } | 3430 } |
3443 | 3431 |
3444 static void reflectTestInterfaceAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3432 static void reflectTestInterfaceAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
3445 { | 3433 { |
3446 v8::Local<v8::Value> v8Value = info[0]; | 3434 v8::Local<v8::Value> v8Value = info[0]; |
3447 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3435 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
(...skipping 13 matching lines...) Expand all Loading... |
3461 } | 3449 } |
3462 | 3450 |
3463 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3451 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3464 { | 3452 { |
3465 v8::Local<v8::Object> holder = info.Holder(); | 3453 v8::Local<v8::Object> holder = info.Holder(); |
3466 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectReflect
edNameAttributeTestAttribute", "TestObject", holder, info.GetIsolate()); | 3454 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectReflect
edNameAttributeTestAttribute", "TestObject", holder, info.GetIsolate()); |
3467 TestObject* impl = V8TestObject::toImpl(holder); | 3455 TestObject* impl = V8TestObject::toImpl(holder); |
3468 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 3456 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
3469 if (!cppValue) { | 3457 if (!cppValue) { |
3470 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 3458 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
3471 exceptionState.throwIfNeeded(); | |
3472 return; | 3459 return; |
3473 } | 3460 } |
3474 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3461 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3475 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, cppValue); | 3462 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, cppValue); |
3476 } | 3463 } |
3477 | 3464 |
3478 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3465 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
3479 { | 3466 { |
3480 v8::Local<v8::Value> v8Value = info[0]; | 3467 v8::Local<v8::Value> v8Value = info[0]; |
3481 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3468 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
(...skipping 11 matching lines...) Expand all Loading... |
3493 { | 3480 { |
3494 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); | 3481 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); |
3495 } | 3482 } |
3496 | 3483 |
3497 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 3484 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
3498 { | 3485 { |
3499 v8::Local<v8::Object> holder = info.Holder(); | 3486 v8::Local<v8::Object> holder = info.Holder(); |
3500 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectBoolean
Attribute", "TestObject", holder, info.GetIsolate()); | 3487 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectBoolean
Attribute", "TestObject", holder, info.GetIsolate()); |
3501 TestObject* impl = V8TestObject::toImpl(holder); | 3488 TestObject* impl = V8TestObject::toImpl(holder); |
3502 bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); | 3489 bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); |
3503 if (exceptionState.throwIfNeeded()) | 3490 if (exceptionState.hadException()) |
3504 return; | 3491 return; |
3505 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3492 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3506 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); | 3493 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); |
3507 } | 3494 } |
3508 | 3495 |
3509 static void reflectBooleanAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 3496 static void reflectBooleanAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
3510 { | 3497 { |
3511 v8::Local<v8::Value> v8Value = info[0]; | 3498 v8::Local<v8::Value> v8Value = info[0]; |
3512 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3499 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3513 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); | 3500 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); |
(...skipping 10 matching lines...) Expand all Loading... |
3524 { | 3511 { |
3525 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); | 3512 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); |
3526 } | 3513 } |
3527 | 3514 |
3528 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 3515 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
3529 { | 3516 { |
3530 v8::Local<v8::Object> holder = info.Holder(); | 3517 v8::Local<v8::Object> holder = info.Holder(); |
3531 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); | 3518 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); |
3532 TestObject* impl = V8TestObject::toImpl(holder); | 3519 TestObject* impl = V8TestObject::toImpl(holder); |
3533 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 3520 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
3534 if (exceptionState.throwIfNeeded()) | 3521 if (exceptionState.hadException()) |
3535 return; | 3522 return; |
3536 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3523 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3537 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); | 3524 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); |
3538 } | 3525 } |
3539 | 3526 |
3540 static void reflectLongAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3527 static void reflectLongAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
3541 { | 3528 { |
3542 v8::Local<v8::Value> v8Value = info[0]; | 3529 v8::Local<v8::Value> v8Value = info[0]; |
3543 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3530 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3544 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); | 3531 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); |
(...skipping 10 matching lines...) Expand all Loading... |
3555 { | 3542 { |
3556 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); | 3543 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); |
3557 } | 3544 } |
3558 | 3545 |
3559 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 3546 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
3560 { | 3547 { |
3561 v8::Local<v8::Object> holder = info.Holder(); | 3548 v8::Local<v8::Object> holder = info.Holder(); |
3562 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); | 3549 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); |
3563 TestObject* impl = V8TestObject::toImpl(holder); | 3550 TestObject* impl = V8TestObject::toImpl(holder); |
3564 unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); | 3551 unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); |
3565 if (exceptionState.throwIfNeeded()) | 3552 if (exceptionState.hadException()) |
3566 return; | 3553 return; |
3567 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3554 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3568 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | 3555 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
3569 } | 3556 } |
3570 | 3557 |
3571 static void reflectUnsignedShortAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3558 static void reflectUnsignedShortAttributeAttributeSetterCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
3572 { | 3559 { |
3573 v8::Local<v8::Value> v8Value = info[0]; | 3560 v8::Local<v8::Value> v8Value = info[0]; |
3574 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3561 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3575 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); | 3562 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); |
(...skipping 10 matching lines...) Expand all Loading... |
3586 { | 3573 { |
3587 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); | 3574 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); |
3588 } | 3575 } |
3589 | 3576 |
3590 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) | 3577 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::FunctionCallbackInfo<v8::Value>& info) |
3591 { | 3578 { |
3592 v8::Local<v8::Object> holder = info.Holder(); | 3579 v8::Local<v8::Object> holder = info.Holder(); |
3593 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); | 3580 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); |
3594 TestObject* impl = V8TestObject::toImpl(holder); | 3581 TestObject* impl = V8TestObject::toImpl(holder); |
3595 unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); | 3582 unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, e
xceptionState); |
3596 if (exceptionState.throwIfNeeded()) | 3583 if (exceptionState.hadException()) |
3597 return; | 3584 return; |
3598 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3585 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3599 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); | 3586 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); |
3600 } | 3587 } |
3601 | 3588 |
3602 static void reflectUnsignedLongAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 3589 static void reflectUnsignedLongAttributeAttributeSetterCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
3603 { | 3590 { |
3604 v8::Local<v8::Value> v8Value = info[0]; | 3591 v8::Local<v8::Value> v8Value = info[0]; |
3605 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3592 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
3606 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); | 3593 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4106 { | 4093 { |
4107 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); | 4094 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); |
4108 } | 4095 } |
4109 | 4096 |
4110 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 4097 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) |
4111 { | 4098 { |
4112 v8::Local<v8::Object> holder = info.Holder(); | 4099 v8::Local<v8::Object> holder = info.Holder(); |
4113 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); | 4100 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); |
4114 TestObject* impl = V8TestObject::toImpl(holder); | 4101 TestObject* impl = V8TestObject::toImpl(holder); |
4115 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4102 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4116 if (exceptionState.throwIfNeeded()) | 4103 if (exceptionState.hadException()) |
4117 return; | 4104 return; |
4118 impl->setRuntimeEnabledLongAttribute(cppValue); | 4105 impl->setRuntimeEnabledLongAttribute(cppValue); |
4119 } | 4106 } |
4120 | 4107 |
4121 static void runtimeEnabledLongAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 4108 static void runtimeEnabledLongAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
4122 { | 4109 { |
4123 v8::Local<v8::Value> v8Value = info[0]; | 4110 v8::Local<v8::Value> v8Value = info[0]; |
4124 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); | 4111 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); |
4125 } | 4112 } |
4126 | 4113 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4248 { | 4235 { |
4249 TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeGett
er(info); | 4236 TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeGett
er(info); |
4250 } | 4237 } |
4251 | 4238 |
4252 static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 4239 static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
4253 { | 4240 { |
4254 v8::Local<v8::Object> holder = info.Holder(); | 4241 v8::Local<v8::Object> holder = info.Holder(); |
4255 ExceptionState exceptionState(ExceptionState::SetterContext, "legacyInterfac
eTypeCheckingFloatAttribute", "TestObject", holder, info.GetIsolate()); | 4242 ExceptionState exceptionState(ExceptionState::SetterContext, "legacyInterfac
eTypeCheckingFloatAttribute", "TestObject", holder, info.GetIsolate()); |
4256 TestObject* impl = V8TestObject::toImpl(holder); | 4243 TestObject* impl = V8TestObject::toImpl(holder); |
4257 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); | 4244 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); |
4258 if (exceptionState.throwIfNeeded()) | 4245 if (exceptionState.hadException()) |
4259 return; | 4246 return; |
4260 impl->setLegacyInterfaceTypeCheckingFloatAttribute(cppValue); | 4247 impl->setLegacyInterfaceTypeCheckingFloatAttribute(cppValue); |
4261 } | 4248 } |
4262 | 4249 |
4263 static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 4250 static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
4264 { | 4251 { |
4265 v8::Local<v8::Value> v8Value = info[0]; | 4252 v8::Local<v8::Value> v8Value = info[0]; |
4266 TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeSett
er(v8Value, info); | 4253 TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeSett
er(v8Value, info); |
4267 } | 4254 } |
4268 | 4255 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4389 { | 4376 { |
4390 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); | 4377 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); |
4391 } | 4378 } |
4392 | 4379 |
4393 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) | 4380 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) |
4394 { | 4381 { |
4395 v8::Local<v8::Object> holder = info.Holder(); | 4382 v8::Local<v8::Object> holder = info.Holder(); |
4396 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); | 4383 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); |
4397 TestObject* impl = V8TestObject::toImpl(holder); | 4384 TestObject* impl = V8TestObject::toImpl(holder); |
4398 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4385 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4399 if (exceptionState.throwIfNeeded()) | 4386 if (exceptionState.hadException()) |
4400 return; | 4387 return; |
4401 impl->setUnforgeableLongAttribute(cppValue); | 4388 impl->setUnforgeableLongAttribute(cppValue); |
4402 } | 4389 } |
4403 | 4390 |
4404 static void unforgeableLongAttributeAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 4391 static void unforgeableLongAttributeAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
4405 { | 4392 { |
4406 v8::Local<v8::Value> v8Value = info[0]; | 4393 v8::Local<v8::Value> v8Value = info[0]; |
4407 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; | 4394 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; |
4408 } | 4395 } |
4409 | 4396 |
4410 static void measuredLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 4397 static void measuredLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
4411 { | 4398 { |
4412 v8::Local<v8::Object> holder = info.Holder(); | 4399 v8::Local<v8::Object> holder = info.Holder(); |
4413 TestObject* impl = V8TestObject::toImpl(holder); | 4400 TestObject* impl = V8TestObject::toImpl(holder); |
4414 v8SetReturnValueInt(info, impl->measuredLongAttribute()); | 4401 v8SetReturnValueInt(info, impl->measuredLongAttribute()); |
4415 } | 4402 } |
4416 | 4403 |
4417 static void measuredLongAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 4404 static void measuredLongAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
4418 { | 4405 { |
4419 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeG
etter); | 4406 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeG
etter); |
4420 TestObjectV8Internal::measuredLongAttributeAttributeGetter(info); | 4407 TestObjectV8Internal::measuredLongAttributeAttributeGetter(info); |
4421 } | 4408 } |
4422 | 4409 |
4423 static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 4410 static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
4424 { | 4411 { |
4425 v8::Local<v8::Object> holder = info.Holder(); | 4412 v8::Local<v8::Object> holder = info.Holder(); |
4426 ExceptionState exceptionState(ExceptionState::SetterContext, "measuredLongAt
tribute", "TestObject", holder, info.GetIsolate()); | 4413 ExceptionState exceptionState(ExceptionState::SetterContext, "measuredLongAt
tribute", "TestObject", holder, info.GetIsolate()); |
4427 TestObject* impl = V8TestObject::toImpl(holder); | 4414 TestObject* impl = V8TestObject::toImpl(holder); |
4428 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4415 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4429 if (exceptionState.throwIfNeeded()) | 4416 if (exceptionState.hadException()) |
4430 return; | 4417 return; |
4431 impl->setMeasuredLongAttribute(cppValue); | 4418 impl->setMeasuredLongAttribute(cppValue); |
4432 } | 4419 } |
4433 | 4420 |
4434 static void measuredLongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 4421 static void measuredLongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
4435 { | 4422 { |
4436 v8::Local<v8::Value> v8Value = info[0]; | 4423 v8::Local<v8::Value> v8Value = info[0]; |
4437 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeS
etter); | 4424 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeS
etter); |
4438 TestObjectV8Internal::measuredLongAttributeAttributeSetter(v8Value, info); | 4425 TestObjectV8Internal::measuredLongAttributeAttributeSetter(v8Value, info); |
4439 } | 4426 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4497 { | 4484 { |
4498 TestObjectV8Internal::unscopeableLongAttributeAttributeGetter(info); | 4485 TestObjectV8Internal::unscopeableLongAttributeAttributeGetter(info); |
4499 } | 4486 } |
4500 | 4487 |
4501 static void unscopeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) | 4488 static void unscopeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::FunctionCallbackInfo<v8::Value>& info) |
4502 { | 4489 { |
4503 v8::Local<v8::Object> holder = info.Holder(); | 4490 v8::Local<v8::Object> holder = info.Holder(); |
4504 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); | 4491 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); |
4505 TestObject* impl = V8TestObject::toImpl(holder); | 4492 TestObject* impl = V8TestObject::toImpl(holder); |
4506 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4493 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4507 if (exceptionState.throwIfNeeded()) | 4494 if (exceptionState.hadException()) |
4508 return; | 4495 return; |
4509 impl->setUnscopeableLongAttribute(cppValue); | 4496 impl->setUnscopeableLongAttribute(cppValue); |
4510 } | 4497 } |
4511 | 4498 |
4512 static void unscopeableLongAttributeAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 4499 static void unscopeableLongAttributeAttributeSetterCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
4513 { | 4500 { |
4514 v8::Local<v8::Value> v8Value = info[0]; | 4501 v8::Local<v8::Value> v8Value = info[0]; |
4515 TestObjectV8Internal::unscopeableLongAttributeAttributeSetter(v8Value, info)
; | 4502 TestObjectV8Internal::unscopeableLongAttributeAttributeSetter(v8Value, info)
; |
4516 } | 4503 } |
4517 | 4504 |
4518 static void unscopeableOriginTrialEnabledLongAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) | 4505 static void unscopeableOriginTrialEnabledLongAttributeAttributeGetter(const v8::
FunctionCallbackInfo<v8::Value>& info) |
4519 { | 4506 { |
4520 v8::Local<v8::Object> holder = info.Holder(); | 4507 v8::Local<v8::Object> holder = info.Holder(); |
4521 TestObject* impl = V8TestObject::toImpl(holder); | 4508 TestObject* impl = V8TestObject::toImpl(holder); |
4522 v8SetReturnValueInt(info, impl->unscopeableOriginTrialEnabledLongAttribute()
); | 4509 v8SetReturnValueInt(info, impl->unscopeableOriginTrialEnabledLongAttribute()
); |
4523 } | 4510 } |
4524 | 4511 |
4525 static void unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 4512 static void unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
4526 { | 4513 { |
4527 TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGet
ter(info); | 4514 TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGet
ter(info); |
4528 } | 4515 } |
4529 | 4516 |
4530 static void unscopeableOriginTrialEnabledLongAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 4517 static void unscopeableOriginTrialEnabledLongAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
4531 { | 4518 { |
4532 v8::Local<v8::Object> holder = info.Holder(); | 4519 v8::Local<v8::Object> holder = info.Holder(); |
4533 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableOri
ginTrialEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | 4520 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableOri
ginTrialEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
4534 TestObject* impl = V8TestObject::toImpl(holder); | 4521 TestObject* impl = V8TestObject::toImpl(holder); |
4535 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4522 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4536 if (exceptionState.throwIfNeeded()) | 4523 if (exceptionState.hadException()) |
4537 return; | 4524 return; |
4538 impl->setUnscopeableOriginTrialEnabledLongAttribute(cppValue); | 4525 impl->setUnscopeableOriginTrialEnabledLongAttribute(cppValue); |
4539 } | 4526 } |
4540 | 4527 |
4541 static void unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 4528 static void unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
4542 { | 4529 { |
4543 v8::Local<v8::Value> v8Value = info[0]; | 4530 v8::Local<v8::Value> v8Value = info[0]; |
4544 TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSet
ter(v8Value, info); | 4531 TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSet
ter(v8Value, info); |
4545 } | 4532 } |
4546 | 4533 |
4547 static void unscopeableRuntimeEnabledLongAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) | 4534 static void unscopeableRuntimeEnabledLongAttributeAttributeGetter(const v8::Func
tionCallbackInfo<v8::Value>& info) |
4548 { | 4535 { |
4549 v8::Local<v8::Object> holder = info.Holder(); | 4536 v8::Local<v8::Object> holder = info.Holder(); |
4550 TestObject* impl = V8TestObject::toImpl(holder); | 4537 TestObject* impl = V8TestObject::toImpl(holder); |
4551 v8SetReturnValueInt(info, impl->unscopeableRuntimeEnabledLongAttribute()); | 4538 v8SetReturnValueInt(info, impl->unscopeableRuntimeEnabledLongAttribute()); |
4552 } | 4539 } |
4553 | 4540 |
4554 static void unscopeableRuntimeEnabledLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4541 static void unscopeableRuntimeEnabledLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
4555 { | 4542 { |
4556 TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeGetter(
info); | 4543 TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeGetter(
info); |
4557 } | 4544 } |
4558 | 4545 |
4559 static void unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 4546 static void unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
4560 { | 4547 { |
4561 v8::Local<v8::Object> holder = info.Holder(); | 4548 v8::Local<v8::Object> holder = info.Holder(); |
4562 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | 4549 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
4563 TestObject* impl = V8TestObject::toImpl(holder); | 4550 TestObject* impl = V8TestObject::toImpl(holder); |
4564 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4551 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4565 if (exceptionState.throwIfNeeded()) | 4552 if (exceptionState.hadException()) |
4566 return; | 4553 return; |
4567 impl->setUnscopeableRuntimeEnabledLongAttribute(cppValue); | 4554 impl->setUnscopeableRuntimeEnabledLongAttribute(cppValue); |
4568 } | 4555 } |
4569 | 4556 |
4570 static void unscopeableRuntimeEnabledLongAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4557 static void unscopeableRuntimeEnabledLongAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
4571 { | 4558 { |
4572 v8::Local<v8::Value> v8Value = info[0]; | 4559 v8::Local<v8::Value> v8Value = info[0]; |
4573 TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); | 4560 TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); |
4574 } | 4561 } |
4575 | 4562 |
(...skipping 10 matching lines...) Expand all Loading... |
4586 } | 4573 } |
4587 | 4574 |
4588 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 4575 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
4589 { | 4576 { |
4590 v8::Local<v8::Object> holder = info.Holder(); | 4577 v8::Local<v8::Object> holder = info.Holder(); |
4591 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestObject", holder, info.GetIsolate()); | 4578 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestObject", holder, info.GetIsolate()); |
4592 TestObject* impl = V8TestObject::toImpl(holder); | 4579 TestObject* impl = V8TestObject::toImpl(holder); |
4593 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 4580 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
4594 if (!cppValue) { | 4581 if (!cppValue) { |
4595 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4582 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
4596 exceptionState.throwIfNeeded(); | |
4597 return; | 4583 return; |
4598 } | 4584 } |
4599 impl->setTestInterfaceAttribute(cppValue); | 4585 impl->setTestInterfaceAttribute(cppValue); |
4600 } | 4586 } |
4601 | 4587 |
4602 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 4588 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
4603 { | 4589 { |
4604 v8::Local<v8::Value> v8Value = info[0]; | 4590 v8::Local<v8::Value> v8Value = info[0]; |
4605 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); | 4591 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); |
4606 } | 4592 } |
(...skipping 11 matching lines...) Expand all Loading... |
4618 } | 4604 } |
4619 | 4605 |
4620 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 4606 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
4621 { | 4607 { |
4622 v8::Local<v8::Object> holder = info.Holder(); | 4608 v8::Local<v8::Object> holder = info.Holder(); |
4623 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedAttribute", "TestObject", holder, info.GetIsolate()); | 4609 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedAttribute", "TestObject", holder, info.GetIsolate()); |
4624 TestObject* impl = V8TestObject::toImpl(holder); | 4610 TestObject* impl = V8TestObject::toImpl(holder); |
4625 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 4611 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
4626 if (!cppValue) { | 4612 if (!cppValue) { |
4627 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); | 4613 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); |
4628 exceptionState.throwIfNeeded(); | |
4629 return; | 4614 return; |
4630 } | 4615 } |
4631 impl->setTestInterfaceGarbageCollectedAttribute(cppValue); | 4616 impl->setTestInterfaceGarbageCollectedAttribute(cppValue); |
4632 } | 4617 } |
4633 | 4618 |
4634 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4619 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
4635 { | 4620 { |
4636 v8::Local<v8::Value> v8Value = info[0]; | 4621 v8::Local<v8::Value> v8Value = info[0]; |
4637 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); | 4622 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); |
4638 } | 4623 } |
(...skipping 11 matching lines...) Expand all Loading... |
4650 } | 4635 } |
4651 | 4636 |
4652 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 4637 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
4653 { | 4638 { |
4654 v8::Local<v8::Object> holder = info.Holder(); | 4639 v8::Local<v8::Object> holder = info.Holder(); |
4655 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedOrNullAttribute", "TestObject", holder, info.GetIsolate()); | 4640 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceG
arbageCollectedOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
4656 TestObject* impl = V8TestObject::toImpl(holder); | 4641 TestObject* impl = V8TestObject::toImpl(holder); |
4657 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 4642 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
4658 if (!cppValue && !isUndefinedOrNull(v8Value)) { | 4643 if (!cppValue && !isUndefinedOrNull(v8Value)) { |
4659 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); | 4644 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfaceGarbageCollected'."); |
4660 exceptionState.throwIfNeeded(); | |
4661 return; | 4645 return; |
4662 } | 4646 } |
4663 impl->setTestInterfaceGarbageCollectedOrNullAttribute(cppValue); | 4647 impl->setTestInterfaceGarbageCollectedOrNullAttribute(cppValue); |
4664 } | 4648 } |
4665 | 4649 |
4666 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 4650 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
4667 { | 4651 { |
4668 v8::Local<v8::Value> v8Value = info[0]; | 4652 v8::Local<v8::Value> v8Value = info[0]; |
4669 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); | 4653 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); |
4670 } | 4654 } |
(...skipping 27 matching lines...) Expand all Loading... |
4698 { | 4682 { |
4699 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 4683 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
4700 } | 4684 } |
4701 | 4685 |
4702 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 4686 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) |
4703 { | 4687 { |
4704 v8::Local<v8::Object> holder = info.Holder(); | 4688 v8::Local<v8::Object> holder = info.Holder(); |
4705 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 4689 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
4706 TestObject* impl = V8TestObject::toImpl(holder); | 4690 TestObject* impl = V8TestObject::toImpl(holder); |
4707 int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 4691 int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
4708 if (exceptionState.throwIfNeeded()) | 4692 if (exceptionState.hadException()) |
4709 return; | 4693 return; |
4710 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 4694 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
4711 } | 4695 } |
4712 | 4696 |
4713 static void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 4697 static void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
4714 { | 4698 { |
4715 v8::Local<v8::Value> v8Value = info[0]; | 4699 v8::Local<v8::Value> v8Value = info[0]; |
4716 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 4700 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
4717 } | 4701 } |
4718 | 4702 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4763 } | 4747 } |
4764 | 4748 |
4765 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) | 4749 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:FunctionCallbackInfo<v8::Value>& info) |
4766 { | 4750 { |
4767 v8::Local<v8::Object> holder = info.Holder(); | 4751 v8::Local<v8::Object> holder = info.Holder(); |
4768 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", holder, info.GetIsolate()); | 4752 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", holder, info.GetIsolate()); |
4769 TestObject* impl = V8TestObject::toImpl(holder); | 4753 TestObject* impl = V8TestObject::toImpl(holder); |
4770 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 4754 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
4771 if (!cppValue) { | 4755 if (!cppValue) { |
4772 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 4756 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
4773 exceptionState.throwIfNeeded(); | |
4774 return; | 4757 return; |
4775 } | 4758 } |
4776 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFra
meIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 4759 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFra
meIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
4777 } | 4760 } |
4778 | 4761 |
4779 static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 4762 static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
4780 { | 4763 { |
4781 v8::Local<v8::Value> v8Value = info[0]; | 4764 v8::Local<v8::Value> v8Value = info[0]; |
4782 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 4765 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
4783 } | 4766 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4834 if (!cppValue.prepare()) | 4817 if (!cppValue.prepare()) |
4835 return; | 4818 return; |
4836 const char* validValues[] = { | 4819 const char* validValues[] = { |
4837 "", | 4820 "", |
4838 "EnumValue1", | 4821 "EnumValue1", |
4839 "EnumValue2", | 4822 "EnumValue2", |
4840 "EnumValue3", | 4823 "EnumValue3", |
4841 }; | 4824 }; |
4842 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { | 4825 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { |
4843 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); | 4826 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
| 4827 // http://heycam.github.io/webidl/#idl-enums |
| 4828 // Assignment of an invalid string value to an attribute is ignored, |
| 4829 // while passing such a value as an operation argument results in |
| 4830 // an exception being thrown. |
| 4831 exceptionState.clearException(); |
4844 return; | 4832 return; |
4845 } | 4833 } |
4846 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue)
; | 4834 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue)
; |
4847 } | 4835 } |
4848 | 4836 |
4849 static void enumForPrivateScriptAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 4837 static void enumForPrivateScriptAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
4850 { | 4838 { |
4851 v8::Local<v8::Value> v8Value = info[0]; | 4839 v8::Local<v8::Value> v8Value = info[0]; |
4852 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); | 4840 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); |
4853 } | 4841 } |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5069 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5057 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
5070 { | 5058 { |
5071 TestObjectV8Internal::unsignedShortMethodMethod(info); | 5059 TestObjectV8Internal::unsignedShortMethodMethod(info); |
5072 } | 5060 } |
5073 | 5061 |
5074 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5062 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
5075 { | 5063 { |
5076 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ateArg", "TestObject", info.Holder(), info.GetIsolate()); | 5064 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ateArg", "TestObject", info.Holder(), info.GetIsolate()); |
5077 if (UNLIKELY(info.Length() < 1)) { | 5065 if (UNLIKELY(info.Length() < 1)) { |
5078 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5066 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5079 exceptionState.throwIfNeeded(); | |
5080 return; | 5067 return; |
5081 } | 5068 } |
5082 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5069 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5083 double dateArg; | 5070 double dateArg; |
5084 { | 5071 { |
5085 dateArg = toCoreDate(info.GetIsolate(), info[0], exceptionState); | 5072 dateArg = toCoreDate(info.GetIsolate(), info[0], exceptionState); |
5086 if (exceptionState.throwIfNeeded()) | 5073 if (exceptionState.hadException()) |
5087 return; | 5074 return; |
5088 } | 5075 } |
5089 impl->voidMethodDateArg(dateArg); | 5076 impl->voidMethodDateArg(dateArg); |
5090 } | 5077 } |
5091 | 5078 |
5092 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5079 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
5093 { | 5080 { |
5094 TestObjectV8Internal::voidMethodDateArgMethod(info); | 5081 TestObjectV8Internal::voidMethodDateArgMethod(info); |
5095 } | 5082 } |
5096 | 5083 |
(...skipping 16 matching lines...) Expand all Loading... |
5113 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5100 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
5114 { | 5101 { |
5115 TestObjectV8Internal::voidMethodStringArgMethod(info); | 5102 TestObjectV8Internal::voidMethodStringArgMethod(info); |
5116 } | 5103 } |
5117 | 5104 |
5118 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 5105 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
5119 { | 5106 { |
5120 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 5107 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
5121 if (UNLIKELY(info.Length() < 1)) { | 5108 if (UNLIKELY(info.Length() < 1)) { |
5122 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5109 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5123 exceptionState.throwIfNeeded(); | |
5124 return; | 5110 return; |
5125 } | 5111 } |
5126 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5112 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5127 V8StringResource<> stringArg; | 5113 V8StringResource<> stringArg; |
5128 { | 5114 { |
5129 stringArg = toByteString(info.GetIsolate(), info[0], exceptionState); | 5115 stringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
5130 if (exceptionState.throwIfNeeded()) | 5116 if (exceptionState.hadException()) |
5131 return; | 5117 return; |
5132 } | 5118 } |
5133 impl->voidMethodByteStringArg(stringArg); | 5119 impl->voidMethodByteStringArg(stringArg); |
5134 } | 5120 } |
5135 | 5121 |
5136 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5122 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
5137 { | 5123 { |
5138 TestObjectV8Internal::voidMethodByteStringArgMethod(info); | 5124 TestObjectV8Internal::voidMethodByteStringArgMethod(info); |
5139 } | 5125 } |
5140 | 5126 |
5141 static void voidMethodUSVStringArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 5127 static void voidMethodUSVStringArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
5142 { | 5128 { |
5143 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
SVStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 5129 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
SVStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
5144 if (UNLIKELY(info.Length() < 1)) { | 5130 if (UNLIKELY(info.Length() < 1)) { |
5145 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5131 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5146 exceptionState.throwIfNeeded(); | |
5147 return; | 5132 return; |
5148 } | 5133 } |
5149 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5134 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5150 V8StringResource<> usvStringArg; | 5135 V8StringResource<> usvStringArg; |
5151 { | 5136 { |
5152 usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState); | 5137 usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState); |
5153 if (exceptionState.throwIfNeeded()) | 5138 if (exceptionState.hadException()) |
5154 return; | 5139 return; |
5155 } | 5140 } |
5156 impl->voidMethodUSVStringArg(usvStringArg); | 5141 impl->voidMethodUSVStringArg(usvStringArg); |
5157 } | 5142 } |
5158 | 5143 |
5159 static void voidMethodUSVStringArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5144 static void voidMethodUSVStringArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
5160 { | 5145 { |
5161 TestObjectV8Internal::voidMethodUSVStringArgMethod(info); | 5146 TestObjectV8Internal::voidMethodUSVStringArgMethod(info); |
5162 } | 5147 } |
5163 | 5148 |
5164 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5149 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
5165 { | 5150 { |
5166 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); | 5151 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); |
5167 if (UNLIKELY(info.Length() < 1)) { | 5152 if (UNLIKELY(info.Length() < 1)) { |
5168 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5153 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5169 exceptionState.throwIfNeeded(); | |
5170 return; | 5154 return; |
5171 } | 5155 } |
5172 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5156 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5173 unsigned long long domTimeStampArg; | 5157 unsigned long long domTimeStampArg; |
5174 { | 5158 { |
5175 domTimeStampArg = toUInt64(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 5159 domTimeStampArg = toUInt64(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
5176 if (exceptionState.throwIfNeeded()) | 5160 if (exceptionState.hadException()) |
5177 return; | 5161 return; |
5178 } | 5162 } |
5179 impl->voidMethodDOMTimeStampArg(domTimeStampArg); | 5163 impl->voidMethodDOMTimeStampArg(domTimeStampArg); |
5180 } | 5164 } |
5181 | 5165 |
5182 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 5166 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
5183 { | 5167 { |
5184 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); | 5168 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); |
5185 } | 5169 } |
5186 | 5170 |
5187 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 5171 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
5188 { | 5172 { |
5189 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanArg", "TestObject", info.Holder(), info.GetIsolate()); | 5173 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
5190 if (UNLIKELY(info.Length() < 1)) { | 5174 if (UNLIKELY(info.Length() < 1)) { |
5191 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5175 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5192 exceptionState.throwIfNeeded(); | |
5193 return; | 5176 return; |
5194 } | 5177 } |
5195 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5178 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5196 bool booleanArg; | 5179 bool booleanArg; |
5197 { | 5180 { |
5198 booleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); | 5181 booleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
5199 if (exceptionState.throwIfNeeded()) | 5182 if (exceptionState.hadException()) |
5200 return; | 5183 return; |
5201 } | 5184 } |
5202 impl->voidMethodBooleanArg(booleanArg); | 5185 impl->voidMethodBooleanArg(booleanArg); |
5203 } | 5186 } |
5204 | 5187 |
5205 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 5188 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
5206 { | 5189 { |
5207 TestObjectV8Internal::voidMethodBooleanArgMethod(info); | 5190 TestObjectV8Internal::voidMethodBooleanArgMethod(info); |
5208 } | 5191 } |
5209 | 5192 |
5210 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5193 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
5211 { | 5194 { |
5212 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteArg", "TestObject", info.Holder(), info.GetIsolate()); | 5195 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteArg", "TestObject", info.Holder(), info.GetIsolate()); |
5213 if (UNLIKELY(info.Length() < 1)) { | 5196 if (UNLIKELY(info.Length() < 1)) { |
5214 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5197 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5215 exceptionState.throwIfNeeded(); | |
5216 return; | 5198 return; |
5217 } | 5199 } |
5218 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5200 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5219 int byteArg; | 5201 int byteArg; |
5220 { | 5202 { |
5221 byteArg = toInt8(info.GetIsolate(), info[0], NormalConversion, exception
State); | 5203 byteArg = toInt8(info.GetIsolate(), info[0], NormalConversion, exception
State); |
5222 if (exceptionState.throwIfNeeded()) | 5204 if (exceptionState.hadException()) |
5223 return; | 5205 return; |
5224 } | 5206 } |
5225 impl->voidMethodByteArg(byteArg); | 5207 impl->voidMethodByteArg(byteArg); |
5226 } | 5208 } |
5227 | 5209 |
5228 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5210 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
5229 { | 5211 { |
5230 TestObjectV8Internal::voidMethodByteArgMethod(info); | 5212 TestObjectV8Internal::voidMethodByteArgMethod(info); |
5231 } | 5213 } |
5232 | 5214 |
5233 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5215 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
5234 { | 5216 { |
5235 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArg", "TestObject", info.Holder(), info.GetIsolate()); | 5217 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArg", "TestObject", info.Holder(), info.GetIsolate()); |
5236 if (UNLIKELY(info.Length() < 1)) { | 5218 if (UNLIKELY(info.Length() < 1)) { |
5237 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5219 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5238 exceptionState.throwIfNeeded(); | |
5239 return; | 5220 return; |
5240 } | 5221 } |
5241 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5222 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5242 double doubleArg; | 5223 double doubleArg; |
5243 { | 5224 { |
5244 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 5225 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
5245 if (exceptionState.throwIfNeeded()) | 5226 if (exceptionState.hadException()) |
5246 return; | 5227 return; |
5247 } | 5228 } |
5248 impl->voidMethodDoubleArg(doubleArg); | 5229 impl->voidMethodDoubleArg(doubleArg); |
5249 } | 5230 } |
5250 | 5231 |
5251 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5232 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
5252 { | 5233 { |
5253 TestObjectV8Internal::voidMethodDoubleArgMethod(info); | 5234 TestObjectV8Internal::voidMethodDoubleArgMethod(info); |
5254 } | 5235 } |
5255 | 5236 |
5256 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5237 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
5257 { | 5238 { |
5258 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodF
loatArg", "TestObject", info.Holder(), info.GetIsolate()); | 5239 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodF
loatArg", "TestObject", info.Holder(), info.GetIsolate()); |
5259 if (UNLIKELY(info.Length() < 1)) { | 5240 if (UNLIKELY(info.Length() < 1)) { |
5260 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5241 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5261 exceptionState.throwIfNeeded(); | |
5262 return; | 5242 return; |
5263 } | 5243 } |
5264 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5244 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5265 float floatArg; | 5245 float floatArg; |
5266 { | 5246 { |
5267 floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState)
; | 5247 floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState)
; |
5268 if (exceptionState.throwIfNeeded()) | 5248 if (exceptionState.hadException()) |
5269 return; | 5249 return; |
5270 } | 5250 } |
5271 impl->voidMethodFloatArg(floatArg); | 5251 impl->voidMethodFloatArg(floatArg); |
5272 } | 5252 } |
5273 | 5253 |
5274 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5254 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
5275 { | 5255 { |
5276 TestObjectV8Internal::voidMethodFloatArgMethod(info); | 5256 TestObjectV8Internal::voidMethodFloatArgMethod(info); |
5277 } | 5257 } |
5278 | 5258 |
5279 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5259 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
5280 { | 5260 { |
5281 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5261 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArg", "TestObject", info.Holder(), info.GetIsolate()); |
5282 if (UNLIKELY(info.Length() < 1)) { | 5262 if (UNLIKELY(info.Length() < 1)) { |
5283 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5263 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5284 exceptionState.throwIfNeeded(); | |
5285 return; | 5264 return; |
5286 } | 5265 } |
5287 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5266 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5288 int longArg; | 5267 int longArg; |
5289 { | 5268 { |
5290 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 5269 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
5291 if (exceptionState.throwIfNeeded()) | 5270 if (exceptionState.hadException()) |
5292 return; | 5271 return; |
5293 } | 5272 } |
5294 impl->voidMethodLongArg(longArg); | 5273 impl->voidMethodLongArg(longArg); |
5295 } | 5274 } |
5296 | 5275 |
5297 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5276 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
5298 { | 5277 { |
5299 TestObjectV8Internal::voidMethodLongArgMethod(info); | 5278 TestObjectV8Internal::voidMethodLongArgMethod(info); |
5300 } | 5279 } |
5301 | 5280 |
5302 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 5281 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
5303 { | 5282 { |
5304 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5283 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
5305 if (UNLIKELY(info.Length() < 1)) { | 5284 if (UNLIKELY(info.Length() < 1)) { |
5306 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5285 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5307 exceptionState.throwIfNeeded(); | |
5308 return; | 5286 return; |
5309 } | 5287 } |
5310 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5288 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5311 long long longLongArg; | 5289 long long longLongArg; |
5312 { | 5290 { |
5313 longLongArg = toInt64(info.GetIsolate(), info[0], NormalConversion, exce
ptionState); | 5291 longLongArg = toInt64(info.GetIsolate(), info[0], NormalConversion, exce
ptionState); |
5314 if (exceptionState.throwIfNeeded()) | 5292 if (exceptionState.hadException()) |
5315 return; | 5293 return; |
5316 } | 5294 } |
5317 impl->voidMethodLongLongArg(longLongArg); | 5295 impl->voidMethodLongLongArg(longLongArg); |
5318 } | 5296 } |
5319 | 5297 |
5320 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 5298 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
5321 { | 5299 { |
5322 TestObjectV8Internal::voidMethodLongLongArgMethod(info); | 5300 TestObjectV8Internal::voidMethodLongLongArgMethod(info); |
5323 } | 5301 } |
5324 | 5302 |
5325 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5303 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
5326 { | 5304 { |
5327 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ctetArg", "TestObject", info.Holder(), info.GetIsolate()); | 5305 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ctetArg", "TestObject", info.Holder(), info.GetIsolate()); |
5328 if (UNLIKELY(info.Length() < 1)) { | 5306 if (UNLIKELY(info.Length() < 1)) { |
5329 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5307 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5330 exceptionState.throwIfNeeded(); | |
5331 return; | 5308 return; |
5332 } | 5309 } |
5333 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5310 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5334 unsigned octetArg; | 5311 unsigned octetArg; |
5335 { | 5312 { |
5336 octetArg = toUInt8(info.GetIsolate(), info[0], NormalConversion, excepti
onState); | 5313 octetArg = toUInt8(info.GetIsolate(), info[0], NormalConversion, excepti
onState); |
5337 if (exceptionState.throwIfNeeded()) | 5314 if (exceptionState.hadException()) |
5338 return; | 5315 return; |
5339 } | 5316 } |
5340 impl->voidMethodOctetArg(octetArg); | 5317 impl->voidMethodOctetArg(octetArg); |
5341 } | 5318 } |
5342 | 5319 |
5343 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5320 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
5344 { | 5321 { |
5345 TestObjectV8Internal::voidMethodOctetArgMethod(info); | 5322 TestObjectV8Internal::voidMethodOctetArgMethod(info); |
5346 } | 5323 } |
5347 | 5324 |
5348 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5325 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
5349 { | 5326 { |
5350 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
hortArg", "TestObject", info.Holder(), info.GetIsolate()); | 5327 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
hortArg", "TestObject", info.Holder(), info.GetIsolate()); |
5351 if (UNLIKELY(info.Length() < 1)) { | 5328 if (UNLIKELY(info.Length() < 1)) { |
5352 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5329 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5353 exceptionState.throwIfNeeded(); | |
5354 return; | 5330 return; |
5355 } | 5331 } |
5356 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5332 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5357 int shortArg; | 5333 int shortArg; |
5358 { | 5334 { |
5359 shortArg = toInt16(info.GetIsolate(), info[0], NormalConversion, excepti
onState); | 5335 shortArg = toInt16(info.GetIsolate(), info[0], NormalConversion, excepti
onState); |
5360 if (exceptionState.throwIfNeeded()) | 5336 if (exceptionState.hadException()) |
5361 return; | 5337 return; |
5362 } | 5338 } |
5363 impl->voidMethodShortArg(shortArg); | 5339 impl->voidMethodShortArg(shortArg); |
5364 } | 5340 } |
5365 | 5341 |
5366 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5342 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
5367 { | 5343 { |
5368 TestObjectV8Internal::voidMethodShortArgMethod(info); | 5344 TestObjectV8Internal::voidMethodShortArgMethod(info); |
5369 } | 5345 } |
5370 | 5346 |
5371 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5347 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
5372 { | 5348 { |
5373 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5349 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
5374 if (UNLIKELY(info.Length() < 1)) { | 5350 if (UNLIKELY(info.Length() < 1)) { |
5375 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5351 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5376 exceptionState.throwIfNeeded(); | |
5377 return; | 5352 return; |
5378 } | 5353 } |
5379 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5354 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5380 unsigned unsignedLongArg; | 5355 unsigned unsignedLongArg; |
5381 { | 5356 { |
5382 unsignedLongArg = toUInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 5357 unsignedLongArg = toUInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
5383 if (exceptionState.throwIfNeeded()) | 5358 if (exceptionState.hadException()) |
5384 return; | 5359 return; |
5385 } | 5360 } |
5386 impl->voidMethodUnsignedLongArg(unsignedLongArg); | 5361 impl->voidMethodUnsignedLongArg(unsignedLongArg); |
5387 } | 5362 } |
5388 | 5363 |
5389 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 5364 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
5390 { | 5365 { |
5391 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); | 5366 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); |
5392 } | 5367 } |
5393 | 5368 |
5394 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 5369 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
5395 { | 5370 { |
5396 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5371 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
5397 if (UNLIKELY(info.Length() < 1)) { | 5372 if (UNLIKELY(info.Length() < 1)) { |
5398 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5373 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5399 exceptionState.throwIfNeeded(); | |
5400 return; | 5374 return; |
5401 } | 5375 } |
5402 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5376 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5403 unsigned long long unsignedLongLongArg; | 5377 unsigned long long unsignedLongLongArg; |
5404 { | 5378 { |
5405 unsignedLongLongArg = toUInt64(info.GetIsolate(), info[0], NormalConvers
ion, exceptionState); | 5379 unsignedLongLongArg = toUInt64(info.GetIsolate(), info[0], NormalConvers
ion, exceptionState); |
5406 if (exceptionState.throwIfNeeded()) | 5380 if (exceptionState.hadException()) |
5407 return; | 5381 return; |
5408 } | 5382 } |
5409 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); | 5383 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); |
5410 } | 5384 } |
5411 | 5385 |
5412 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 5386 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
5413 { | 5387 { |
5414 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); | 5388 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); |
5415 } | 5389 } |
5416 | 5390 |
5417 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5391 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
5418 { | 5392 { |
5419 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | 5393 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
5420 if (UNLIKELY(info.Length() < 1)) { | 5394 if (UNLIKELY(info.Length() < 1)) { |
5421 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5395 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
5422 exceptionState.throwIfNeeded(); | |
5423 return; | 5396 return; |
5424 } | 5397 } |
5425 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5398 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5426 unsigned unsignedShortArg; | 5399 unsigned unsignedShortArg; |
5427 { | 5400 { |
5428 unsignedShortArg = toUInt16(info.GetIsolate(), info[0], NormalConversion
, exceptionState); | 5401 unsignedShortArg = toUInt16(info.GetIsolate(), info[0], NormalConversion
, exceptionState); |
5429 if (exceptionState.throwIfNeeded()) | 5402 if (exceptionState.hadException()) |
5430 return; | 5403 return; |
5431 } | 5404 } |
5432 impl->voidMethodUnsignedShortArg(unsignedShortArg); | 5405 impl->voidMethodUnsignedShortArg(unsignedShortArg); |
5433 } | 5406 } |
5434 | 5407 |
5435 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 5408 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
5436 { | 5409 { |
5437 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); | 5410 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); |
5438 } | 5411 } |
5439 | 5412 |
(...skipping 29 matching lines...) Expand all Loading... |
5469 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 5442 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
5470 { | 5443 { |
5471 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); | 5444 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); |
5472 } | 5445 } |
5473 | 5446 |
5474 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 5447 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
5475 { | 5448 { |
5476 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 5449 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
5477 if (UNLIKELY(info.Length() < 2)) { | 5450 if (UNLIKELY(info.Length() < 2)) { |
5478 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 5451 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
5479 exceptionState.throwIfNeeded(); | |
5480 return; | 5452 return; |
5481 } | 5453 } |
5482 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5454 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
5483 int longArg; | 5455 int longArg; |
5484 TestInterfaceEmpty* testInterfaceEmptyArg; | 5456 TestInterfaceEmpty* testInterfaceEmptyArg; |
5485 { | 5457 { |
5486 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 5458 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
5487 if (exceptionState.throwIfNeeded()) | 5459 if (exceptionState.hadException()) |
5488 return; | 5460 return; |
5489 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); | 5461 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); |
5490 if (!testInterfaceEmptyArg) { | 5462 if (!testInterfaceEmptyArg) { |
5491 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); | 5463 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); |
5492 exceptionState.throwIfNeeded(); | |
5493 return; | 5464 return; |
5494 } | 5465 } |
5495 } | 5466 } |
5496 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg)
; | 5467 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg)
; |
5497 } | 5468 } |
5498 | 5469 |
5499 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 5470 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
5500 { | 5471 { |
5501 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); | 5472 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); |
5502 } | 5473 } |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6059 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 6030 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
6060 { | 6031 { |
6061 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); | 6032 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); |
6062 } | 6033 } |
6063 | 6034 |
6064 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 6035 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
6065 { | 6036 { |
6066 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 6037 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
6067 if (UNLIKELY(info.Length() < 1)) { | 6038 if (UNLIKELY(info.Length() < 1)) { |
6068 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6039 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6069 exceptionState.throwIfNeeded(); | |
6070 return; | 6040 return; |
6071 } | 6041 } |
6072 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6042 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6073 Vector<int> arrayLongArg; | 6043 Vector<int> arrayLongArg; |
6074 { | 6044 { |
6075 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e
xceptionState); | 6045 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e
xceptionState); |
6076 if (exceptionState.throwIfNeeded()) | 6046 if (exceptionState.hadException()) |
6077 return; | 6047 return; |
6078 } | 6048 } |
6079 impl->voidMethodArrayLongArg(arrayLongArg); | 6049 impl->voidMethodArrayLongArg(arrayLongArg); |
6080 } | 6050 } |
6081 | 6051 |
6082 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 6052 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
6083 { | 6053 { |
6084 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); | 6054 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); |
6085 } | 6055 } |
6086 | 6056 |
6087 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6057 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
6088 { | 6058 { |
6089 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 6059 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
6090 if (UNLIKELY(info.Length() < 1)) { | 6060 if (UNLIKELY(info.Length() < 1)) { |
6091 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6061 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6092 exceptionState.throwIfNeeded(); | |
6093 return; | 6062 return; |
6094 } | 6063 } |
6095 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6064 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6096 Vector<String> arrayStringArg; | 6065 Vector<String> arrayStringArg; |
6097 { | 6066 { |
6098 arrayStringArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate
(), exceptionState); | 6067 arrayStringArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate
(), exceptionState); |
6099 if (exceptionState.throwIfNeeded()) | 6068 if (exceptionState.hadException()) |
6100 return; | 6069 return; |
6101 } | 6070 } |
6102 impl->voidMethodArrayStringArg(arrayStringArg); | 6071 impl->voidMethodArrayStringArg(arrayStringArg); |
6103 } | 6072 } |
6104 | 6073 |
6105 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 6074 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
6106 { | 6075 { |
6107 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); | 6076 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); |
6108 } | 6077 } |
6109 | 6078 |
6110 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6079 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
6111 { | 6080 { |
6112 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 6081 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
6113 if (UNLIKELY(info.Length() < 1)) { | 6082 if (UNLIKELY(info.Length() < 1)) { |
6114 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6083 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6115 exceptionState.throwIfNeeded(); | |
6116 return; | 6084 return; |
6117 } | 6085 } |
6118 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6086 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6119 HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; | 6087 HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; |
6120 { | 6088 { |
6121 arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty>(in
fo[0], 1, info.GetIsolate(), exceptionState)); | 6089 arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty>(in
fo[0], 1, info.GetIsolate(), exceptionState)); |
6122 if (exceptionState.throwIfNeeded()) | 6090 if (exceptionState.hadException()) |
6123 return; | 6091 return; |
6124 } | 6092 } |
6125 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); | 6093 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); |
6126 } | 6094 } |
6127 | 6095 |
6128 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 6096 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
6129 { | 6097 { |
6130 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); | 6098 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); |
6131 } | 6099 } |
6132 | 6100 |
6133 static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 6101 static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
6134 { | 6102 { |
6135 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodN
ullableArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 6103 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodN
ullableArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
6136 if (UNLIKELY(info.Length() < 1)) { | 6104 if (UNLIKELY(info.Length() < 1)) { |
6137 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6105 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6138 exceptionState.throwIfNeeded(); | |
6139 return; | 6106 return; |
6140 } | 6107 } |
6141 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6108 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6142 Nullable<Vector<int>> arrayLongArg; | 6109 Nullable<Vector<int>> arrayLongArg; |
6143 { | 6110 { |
6144 if (!isUndefinedOrNull(info[0])) { | 6111 if (!isUndefinedOrNull(info[0])) { |
6145 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(
), exceptionState); | 6112 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(
), exceptionState); |
6146 if (exceptionState.throwIfNeeded()) | 6113 if (exceptionState.hadException()) |
6147 return; | 6114 return; |
6148 } | 6115 } |
6149 } | 6116 } |
6150 impl->voidMethodNullableArrayLongArg(arrayLongArg); | 6117 impl->voidMethodNullableArrayLongArg(arrayLongArg); |
6151 } | 6118 } |
6152 | 6119 |
6153 static void voidMethodNullableArrayLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 6120 static void voidMethodNullableArrayLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
6154 { | 6121 { |
6155 TestObjectV8Internal::voidMethodNullableArrayLongArgMethod(info); | 6122 TestObjectV8Internal::voidMethodNullableArrayLongArgMethod(info); |
6156 } | 6123 } |
(...skipping 29 matching lines...) Expand all Loading... |
6186 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6153 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
6187 { | 6154 { |
6188 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); | 6155 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); |
6189 } | 6156 } |
6190 | 6157 |
6191 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 6158 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
6192 { | 6159 { |
6193 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 6160 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
6194 if (UNLIKELY(info.Length() < 1)) { | 6161 if (UNLIKELY(info.Length() < 1)) { |
6195 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6162 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6196 exceptionState.throwIfNeeded(); | |
6197 return; | 6163 return; |
6198 } | 6164 } |
6199 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6165 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6200 Vector<int> longSequenceArg; | 6166 Vector<int> longSequenceArg; |
6201 { | 6167 { |
6202 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate()
, exceptionState); | 6168 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate()
, exceptionState); |
6203 if (exceptionState.throwIfNeeded()) | 6169 if (exceptionState.hadException()) |
6204 return; | 6170 return; |
6205 } | 6171 } |
6206 impl->voidMethodSequenceLongArg(longSequenceArg); | 6172 impl->voidMethodSequenceLongArg(longSequenceArg); |
6207 } | 6173 } |
6208 | 6174 |
6209 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6175 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
6210 { | 6176 { |
6211 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); | 6177 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); |
6212 } | 6178 } |
6213 | 6179 |
6214 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 6180 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
6215 { | 6181 { |
6216 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 6182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
6217 if (UNLIKELY(info.Length() < 1)) { | 6183 if (UNLIKELY(info.Length() < 1)) { |
6218 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6184 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6219 exceptionState.throwIfNeeded(); | |
6220 return; | 6185 return; |
6221 } | 6186 } |
6222 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6187 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6223 Vector<String> stringSequenceArg; | 6188 Vector<String> stringSequenceArg; |
6224 { | 6189 { |
6225 stringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsol
ate(), exceptionState); | 6190 stringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsol
ate(), exceptionState); |
6226 if (exceptionState.throwIfNeeded()) | 6191 if (exceptionState.hadException()) |
6227 return; | 6192 return; |
6228 } | 6193 } |
6229 impl->voidMethodSequenceStringArg(stringSequenceArg); | 6194 impl->voidMethodSequenceStringArg(stringSequenceArg); |
6230 } | 6195 } |
6231 | 6196 |
6232 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 6197 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
6233 { | 6198 { |
6234 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); | 6199 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); |
6235 } | 6200 } |
6236 | 6201 |
6237 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 6202 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
6238 { | 6203 { |
6239 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 6204 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
6240 if (UNLIKELY(info.Length() < 1)) { | 6205 if (UNLIKELY(info.Length() < 1)) { |
6241 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6206 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6242 exceptionState.throwIfNeeded(); | |
6243 return; | 6207 return; |
6244 } | 6208 } |
6245 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6209 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6246 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; | 6210 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; |
6247 { | 6211 { |
6248 testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty>
(info[0], 1, info.GetIsolate(), exceptionState)); | 6212 testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty>
(info[0], 1, info.GetIsolate(), exceptionState)); |
6249 if (exceptionState.throwIfNeeded()) | 6213 if (exceptionState.hadException()) |
6250 return; | 6214 return; |
6251 } | 6215 } |
6252 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; | 6216 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; |
6253 } | 6217 } |
6254 | 6218 |
6255 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 6219 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
6256 { | 6220 { |
6257 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); | 6221 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); |
6258 } | 6222 } |
6259 | 6223 |
6260 static void voidMethodSequenceSequenceDOMStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 6224 static void voidMethodSequenceSequenceDOMStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
6261 { | 6225 { |
6262 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceSequenceDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 6226 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
equenceSequenceDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
6263 if (UNLIKELY(info.Length() < 1)) { | 6227 if (UNLIKELY(info.Length() < 1)) { |
6264 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6228 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6265 exceptionState.throwIfNeeded(); | |
6266 return; | 6229 return; |
6267 } | 6230 } |
6268 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6231 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6269 Vector<Vector<String>> stringSequenceSequenceArg; | 6232 Vector<Vector<String>> stringSequenceSequenceArg; |
6270 { | 6233 { |
6271 stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0],
1, info.GetIsolate(), exceptionState); | 6234 stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0],
1, info.GetIsolate(), exceptionState); |
6272 if (exceptionState.throwIfNeeded()) | 6235 if (exceptionState.hadException()) |
6273 return; | 6236 return; |
6274 } | 6237 } |
6275 impl->voidMethodSequenceSequenceDOMStringArg(stringSequenceSequenceArg); | 6238 impl->voidMethodSequenceSequenceDOMStringArg(stringSequenceSequenceArg); |
6276 } | 6239 } |
6277 | 6240 |
6278 static void voidMethodSequenceSequenceDOMStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 6241 static void voidMethodSequenceSequenceDOMStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
6279 { | 6242 { |
6280 TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethod(info); | 6243 TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethod(info); |
6281 } | 6244 } |
6282 | 6245 |
6283 static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6246 static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
6284 { | 6247 { |
6285 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodN
ullableSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 6248 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodN
ullableSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
6286 if (UNLIKELY(info.Length() < 1)) { | 6249 if (UNLIKELY(info.Length() < 1)) { |
6287 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6250 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6288 exceptionState.throwIfNeeded(); | |
6289 return; | 6251 return; |
6290 } | 6252 } |
6291 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6253 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6292 Nullable<Vector<int>> longSequenceArg; | 6254 Nullable<Vector<int>> longSequenceArg; |
6293 { | 6255 { |
6294 if (!isUndefinedOrNull(info[0])) { | 6256 if (!isUndefinedOrNull(info[0])) { |
6295 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsola
te(), exceptionState); | 6257 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsola
te(), exceptionState); |
6296 if (exceptionState.throwIfNeeded()) | 6258 if (exceptionState.hadException()) |
6297 return; | 6259 return; |
6298 } | 6260 } |
6299 } | 6261 } |
6300 impl->voidMethodNullableSequenceLongArg(longSequenceArg); | 6262 impl->voidMethodNullableSequenceLongArg(longSequenceArg); |
6301 } | 6263 } |
6302 | 6264 |
6303 static void voidMethodNullableSequenceLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 6265 static void voidMethodNullableSequenceLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
6304 { | 6266 { |
6305 TestObjectV8Internal::voidMethodNullableSequenceLongArgMethod(info); | 6267 TestObjectV8Internal::voidMethodNullableSequenceLongArgMethod(info); |
6306 } | 6268 } |
6307 | 6269 |
6308 static void longFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6270 static void longFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
6309 { | 6271 { |
6310 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6272 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6311 v8SetReturnValue(info, freezeV8Object(toV8(impl->longFrozenArrayMethod(), in
fo.Holder(), info.GetIsolate()), info.GetIsolate())); | 6273 v8SetReturnValue(info, freezeV8Object(toV8(impl->longFrozenArrayMethod(), in
fo.Holder(), info.GetIsolate()), info.GetIsolate())); |
6312 } | 6274 } |
6313 | 6275 |
6314 static void longFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6276 static void longFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
6315 { | 6277 { |
6316 TestObjectV8Internal::longFrozenArrayMethodMethod(info); | 6278 TestObjectV8Internal::longFrozenArrayMethodMethod(info); |
6317 } | 6279 } |
6318 | 6280 |
6319 static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6281 static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
6320 { | 6282 { |
6321 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); | 6283 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
6322 if (UNLIKELY(info.Length() < 1)) { | 6284 if (UNLIKELY(info.Length() < 1)) { |
6323 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6285 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6324 exceptionState.throwIfNeeded(); | |
6325 return; | 6286 return; |
6326 } | 6287 } |
6327 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6288 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6328 Vector<String> stringFrozenArrayArg; | 6289 Vector<String> stringFrozenArrayArg; |
6329 { | 6290 { |
6330 stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetI
solate(), exceptionState); | 6291 stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetI
solate(), exceptionState); |
6331 if (exceptionState.throwIfNeeded()) | 6292 if (exceptionState.hadException()) |
6332 return; | 6293 return; |
6333 } | 6294 } |
6334 impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg); | 6295 impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg); |
6335 } | 6296 } |
6336 | 6297 |
6337 static void voidMethodStringFrozenArrayMethodMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 6298 static void voidMethodStringFrozenArrayMethodMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
6338 { | 6299 { |
6339 TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethod(info); | 6300 TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethod(info); |
6340 } | 6301 } |
6341 | 6302 |
6342 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 6303 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
6343 { | 6304 { |
6344 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 6305 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
6345 if (UNLIKELY(info.Length() < 1)) { | 6306 if (UNLIKELY(info.Length() < 1)) { |
6346 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6307 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6347 exceptionState.throwIfNeeded(); | |
6348 return; | 6308 return; |
6349 } | 6309 } |
6350 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6310 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6351 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg; | 6311 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg; |
6352 { | 6312 { |
6353 testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmp
ty>(info[0], 1, info.GetIsolate(), exceptionState)); | 6313 testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmp
ty>(info[0], 1, info.GetIsolate(), exceptionState)); |
6354 if (exceptionState.throwIfNeeded()) | 6314 if (exceptionState.hadException()) |
6355 return; | 6315 return; |
6356 } | 6316 } |
6357 impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozen
ArrayArg); | 6317 impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozen
ArrayArg); |
6358 } | 6318 } |
6359 | 6319 |
6360 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 6320 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
6361 { | 6321 { |
6362 TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(in
fo); | 6322 TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(in
fo); |
6363 } | 6323 } |
6364 | 6324 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6451 static void testInterfaceOrLongMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6411 static void testInterfaceOrLongMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
6452 { | 6412 { |
6453 TestObjectV8Internal::testInterfaceOrLongMethodMethod(info); | 6413 TestObjectV8Internal::testInterfaceOrLongMethodMethod(info); |
6454 } | 6414 } |
6455 | 6415 |
6456 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 6416 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
6457 { | 6417 { |
6458 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 6418 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
6459 if (UNLIKELY(info.Length() < 1)) { | 6419 if (UNLIKELY(info.Length() < 1)) { |
6460 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6420 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6461 exceptionState.throwIfNeeded(); | |
6462 return; | 6421 return; |
6463 } | 6422 } |
6464 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6423 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6465 DoubleOrString arg; | 6424 DoubleOrString arg; |
6466 { | 6425 { |
6467 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::NotNullable, exceptionState); | 6426 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::NotNullable, exceptionState); |
6468 if (exceptionState.throwIfNeeded()) | 6427 if (exceptionState.hadException()) |
6469 return; | 6428 return; |
6470 } | 6429 } |
6471 impl->voidMethodDoubleOrDOMStringArg(arg); | 6430 impl->voidMethodDoubleOrDOMStringArg(arg); |
6472 } | 6431 } |
6473 | 6432 |
6474 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 6433 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
6475 { | 6434 { |
6476 TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethod(info); | 6435 TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethod(info); |
6477 } | 6436 } |
6478 | 6437 |
6479 static void voidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6438 static void voidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
6480 { | 6439 { |
6481 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringOrNullArg", "TestObject", info.Holder(), info.GetIsolate()); | 6440 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringOrNullArg", "TestObject", info.Holder(), info.GetIsolate()); |
6482 if (UNLIKELY(info.Length() < 1)) { | 6441 if (UNLIKELY(info.Length() < 1)) { |
6483 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6442 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6484 exceptionState.throwIfNeeded(); | |
6485 return; | 6443 return; |
6486 } | 6444 } |
6487 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6445 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6488 DoubleOrString arg; | 6446 DoubleOrString arg; |
6489 { | 6447 { |
6490 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::Nullable, exceptionState); | 6448 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::Nullable, exceptionState); |
6491 if (exceptionState.throwIfNeeded()) | 6449 if (exceptionState.hadException()) |
6492 return; | 6450 return; |
6493 } | 6451 } |
6494 impl->voidMethodDoubleOrDOMStringOrNullArg(arg); | 6452 impl->voidMethodDoubleOrDOMStringOrNullArg(arg); |
6495 } | 6453 } |
6496 | 6454 |
6497 static void voidMethodDoubleOrDOMStringOrNullArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 6455 static void voidMethodDoubleOrDOMStringOrNullArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
6498 { | 6456 { |
6499 TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethod(info); | 6457 TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethod(info); |
6500 } | 6458 } |
6501 | 6459 |
6502 static void voidMethodDoubleOrNullOrDOMStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6460 static void voidMethodDoubleOrNullOrDOMStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
6503 { | 6461 { |
6504 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrNullOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 6462 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrNullOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
6505 if (UNLIKELY(info.Length() < 1)) { | 6463 if (UNLIKELY(info.Length() < 1)) { |
6506 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6464 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6507 exceptionState.throwIfNeeded(); | |
6508 return; | 6465 return; |
6509 } | 6466 } |
6510 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6467 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6511 DoubleOrString arg; | 6468 DoubleOrString arg; |
6512 { | 6469 { |
6513 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTyp
eConversionMode::Nullable, exceptionState); | 6470 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTyp
eConversionMode::Nullable, exceptionState); |
6514 if (exceptionState.throwIfNeeded()) | 6471 if (exceptionState.hadException()) |
6515 return; | 6472 return; |
6516 } | 6473 } |
6517 impl->voidMethodDoubleOrNullOrDOMStringArg(arg); | 6474 impl->voidMethodDoubleOrNullOrDOMStringArg(arg); |
6518 } | 6475 } |
6519 | 6476 |
6520 static void voidMethodDoubleOrNullOrDOMStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 6477 static void voidMethodDoubleOrNullOrDOMStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
6521 { | 6478 { |
6522 TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethod(info); | 6479 TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethod(info); |
6523 } | 6480 } |
6524 | 6481 |
6525 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 6482 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
6526 { | 6483 { |
6527 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMStringOrArrayBufferOrArrayBufferViewArg", "TestObject", info.Holder(), info.Ge
tIsolate()); | 6484 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMStringOrArrayBufferOrArrayBufferViewArg", "TestObject", info.Holder(), info.Ge
tIsolate()); |
6528 if (UNLIKELY(info.Length() < 1)) { | 6485 if (UNLIKELY(info.Length() < 1)) { |
6529 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6486 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6530 exceptionState.throwIfNeeded(); | |
6531 return; | 6487 return; |
6532 } | 6488 } |
6533 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6489 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6534 StringOrArrayBufferOrArrayBufferView arg; | 6490 StringOrArrayBufferOrArrayBufferView arg; |
6535 { | 6491 { |
6536 V8StringOrArrayBufferOrArrayBufferView::toImpl(info.GetIsolate(), info[0
], arg, UnionTypeConversionMode::NotNullable, exceptionState); | 6492 V8StringOrArrayBufferOrArrayBufferView::toImpl(info.GetIsolate(), info[0
], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
6537 if (exceptionState.throwIfNeeded()) | 6493 if (exceptionState.hadException()) |
6538 return; | 6494 return; |
6539 } | 6495 } |
6540 impl->voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg(arg); | 6496 impl->voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg(arg); |
6541 } | 6497 } |
6542 | 6498 |
6543 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 6499 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
6544 { | 6500 { |
6545 TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMe
thod(info); | 6501 TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMe
thod(info); |
6546 } | 6502 } |
6547 | 6503 |
6548 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | 6504 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) |
6549 { | 6505 { |
6550 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayBufferOrArrayBufferViewOrDictionaryArg", "TestObject", info.Holder(), info.G
etIsolate()); | 6506 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayBufferOrArrayBufferViewOrDictionaryArg", "TestObject", info.Holder(), info.G
etIsolate()); |
6551 if (UNLIKELY(info.Length() < 1)) { | 6507 if (UNLIKELY(info.Length() < 1)) { |
6552 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6508 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6553 exceptionState.throwIfNeeded(); | |
6554 return; | 6509 return; |
6555 } | 6510 } |
6556 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6511 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6557 ArrayBufferOrArrayBufferViewOrDictionary arg; | 6512 ArrayBufferOrArrayBufferViewOrDictionary arg; |
6558 { | 6513 { |
6559 V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(info.GetIsolate(), in
fo[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); | 6514 V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(info.GetIsolate(), in
fo[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
6560 if (exceptionState.throwIfNeeded()) | 6515 if (exceptionState.hadException()) |
6561 return; | 6516 return; |
6562 } | 6517 } |
6563 impl->voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg(arg); | 6518 impl->voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg(arg); |
6564 } | 6519 } |
6565 | 6520 |
6566 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 6521 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
6567 { | 6522 { |
6568 TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgM
ethod(info); | 6523 TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgM
ethod(info); |
6569 } | 6524 } |
6570 | 6525 |
6571 static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 6526 static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
6572 { | 6527 { |
6573 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayOfDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 6528 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayOfDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
6574 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6529 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6575 HeapVector<DoubleOrString> arg; | 6530 HeapVector<DoubleOrString> arg; |
6576 { | 6531 { |
6577 arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionStat
e); | 6532 arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionStat
e); |
6578 if (exceptionState.throwIfNeeded()) | 6533 if (exceptionState.hadException()) |
6579 return; | 6534 return; |
6580 } | 6535 } |
6581 impl->voidMethodArrayOfDoubleOrDOMStringArg(arg); | 6536 impl->voidMethodArrayOfDoubleOrDOMStringArg(arg); |
6582 } | 6537 } |
6583 | 6538 |
6584 static void voidMethodArrayOfDoubleOrDOMStringArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 6539 static void voidMethodArrayOfDoubleOrDOMStringArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
6585 { | 6540 { |
6586 TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethod(info); | 6541 TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethod(info); |
6587 } | 6542 } |
6588 | 6543 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6687 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 6642 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
6688 { | 6643 { |
6689 TestObjectV8Internal::testEnumMethodMethod(info); | 6644 TestObjectV8Internal::testEnumMethodMethod(info); |
6690 } | 6645 } |
6691 | 6646 |
6692 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6647 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
6693 { | 6648 { |
6694 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estEnumArg", "TestObject", info.Holder(), info.GetIsolate()); | 6649 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estEnumArg", "TestObject", info.Holder(), info.GetIsolate()); |
6695 if (UNLIKELY(info.Length() < 1)) { | 6650 if (UNLIKELY(info.Length() < 1)) { |
6696 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6651 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6697 exceptionState.throwIfNeeded(); | |
6698 return; | 6652 return; |
6699 } | 6653 } |
6700 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6654 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6701 V8StringResource<> testEnumTypeArg; | 6655 V8StringResource<> testEnumTypeArg; |
6702 { | 6656 { |
6703 testEnumTypeArg = info[0]; | 6657 testEnumTypeArg = info[0]; |
6704 if (!testEnumTypeArg.prepare()) | 6658 if (!testEnumTypeArg.prepare()) |
6705 return; | 6659 return; |
6706 const char* validValues[] = { | 6660 const char* validValues[] = { |
6707 "", | 6661 "", |
6708 "EnumValue1", | 6662 "EnumValue1", |
6709 "EnumValue2", | 6663 "EnumValue2", |
6710 "EnumValue3", | 6664 "EnumValue3", |
6711 }; | 6665 }; |
6712 if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validVal
ues), "TestEnum", exceptionState)) { | 6666 if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validVal
ues), "TestEnum", exceptionState)) { |
6713 exceptionState.throwIfNeeded(); | |
6714 return; | 6667 return; |
6715 } | 6668 } |
6716 } | 6669 } |
6717 impl->voidMethodTestEnumArg(testEnumTypeArg); | 6670 impl->voidMethodTestEnumArg(testEnumTypeArg); |
6718 } | 6671 } |
6719 | 6672 |
6720 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6673 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
6721 { | 6674 { |
6722 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); | 6675 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); |
6723 } | 6676 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6762 TestObjectV8Internal::nullableTestDictionaryMethodMethod(info); | 6715 TestObjectV8Internal::nullableTestDictionaryMethodMethod(info); |
6763 } | 6716 } |
6764 | 6717 |
6765 static void passPermissiveDictionaryMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 6718 static void passPermissiveDictionaryMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
6766 { | 6719 { |
6767 ExceptionState exceptionState(ExceptionState::ExecutionContext, "passPermiss
iveDictionaryMethod", "TestObject", info.Holder(), info.GetIsolate()); | 6720 ExceptionState exceptionState(ExceptionState::ExecutionContext, "passPermiss
iveDictionaryMethod", "TestObject", info.Holder(), info.GetIsolate()); |
6768 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6721 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6769 TestDictionary arg; | 6722 TestDictionary arg; |
6770 { | 6723 { |
6771 V8TestDictionary::toImpl(info.GetIsolate(), info[0], arg, exceptionState
); | 6724 V8TestDictionary::toImpl(info.GetIsolate(), info[0], arg, exceptionState
); |
6772 if (exceptionState.throwIfNeeded()) | 6725 if (exceptionState.hadException()) |
6773 return; | 6726 return; |
6774 } | 6727 } |
6775 impl->passPermissiveDictionaryMethod(arg); | 6728 impl->passPermissiveDictionaryMethod(arg); |
6776 } | 6729 } |
6777 | 6730 |
6778 static void passPermissiveDictionaryMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 6731 static void passPermissiveDictionaryMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
6779 { | 6732 { |
6780 TestObjectV8Internal::passPermissiveDictionaryMethodMethod(info); | 6733 TestObjectV8Internal::passPermissiveDictionaryMethodMethod(info); |
6781 } | 6734 } |
6782 | 6735 |
6783 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 6736 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
6784 { | 6737 { |
6785 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6738 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6786 v8SetReturnValue(info, impl->nodeFilterMethod()); | 6739 v8SetReturnValue(info, impl->nodeFilterMethod()); |
6787 } | 6740 } |
6788 | 6741 |
6789 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6742 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
6790 { | 6743 { |
6791 TestObjectV8Internal::nodeFilterMethodMethod(info); | 6744 TestObjectV8Internal::nodeFilterMethodMethod(info); |
6792 } | 6745 } |
6793 | 6746 |
6794 static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value>
& info, ExceptionState& exceptionState) | 6747 static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value>
& info, ExceptionState& exceptionState) |
6795 { | 6748 { |
6796 if (UNLIKELY(info.Length() < 3)) { | 6749 if (UNLIKELY(info.Length() < 3)) { |
6797 setMinimumArityTypeError(exceptionState, 3, info.Length()); | 6750 setMinimumArityTypeError(exceptionState, 3, info.Length()); |
| 6751 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); |
6798 return; | 6752 return; |
6799 } | 6753 } |
6800 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6754 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6801 int arg1; | 6755 int arg1; |
6802 Dictionary arg2; | 6756 Dictionary arg2; |
6803 V8StringResource<> arg3; | 6757 V8StringResource<> arg3; |
6804 Vector<String> variadic; | 6758 Vector<String> variadic; |
6805 { | 6759 { |
6806 arg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSt
ate); | 6760 arg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSt
ate); |
6807 if (exceptionState.hadException()) | 6761 if (exceptionState.hadException()) |
6808 return; | 6762 return; |
6809 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { | 6763 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
6810 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); | 6764 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); |
| 6765 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); |
6811 return; | 6766 return; |
6812 } | 6767 } |
6813 arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState); | 6768 arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState); |
6814 if (exceptionState.hadException()) | 6769 if (exceptionState.hadException()) |
6815 return; | 6770 return; |
6816 arg3 = info[2]; | 6771 arg3 = info[2]; |
6817 if (!arg3.prepare(exceptionState)) | 6772 if (!arg3.prepare(exceptionState)) |
6818 return; | 6773 return; |
6819 variadic = toImplArguments<Vector<String>>(info, 3, exceptionState); | 6774 variadic = toImplArguments<Vector<String>>(info, 3, exceptionState); |
6820 if (exceptionState.hadException()) | 6775 if (exceptionState.hadException()) |
(...skipping 12 matching lines...) Expand all Loading... |
6833 | 6788 |
6834 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6789 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
6835 { | 6790 { |
6836 TestObjectV8Internal::promiseMethodMethod(info); | 6791 TestObjectV8Internal::promiseMethodMethod(info); |
6837 } | 6792 } |
6838 | 6793 |
6839 static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa
llbackInfo<v8::Value>& info, ExceptionState& exceptionState) | 6794 static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa
llbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
6840 { | 6795 { |
6841 if (UNLIKELY(info.Length() < 1)) { | 6796 if (UNLIKELY(info.Length() < 1)) { |
6842 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6797 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 6798 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); |
6843 return; | 6799 return; |
6844 } | 6800 } |
6845 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6801 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6846 Dictionary arg1; | 6802 Dictionary arg1; |
6847 { | 6803 { |
6848 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 6804 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
6849 exceptionState.throwTypeError("parameter 1 ('arg1') is not an object
."); | 6805 exceptionState.throwTypeError("parameter 1 ('arg1') is not an object
."); |
| 6806 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); |
6850 return; | 6807 return; |
6851 } | 6808 } |
6852 arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState); | 6809 arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState); |
6853 if (exceptionState.hadException()) | 6810 if (exceptionState.hadException()) |
6854 return; | 6811 return; |
6855 } | 6812 } |
6856 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); | 6813 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); |
6857 } | 6814 } |
6858 | 6815 |
6859 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6816 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
(...skipping 29 matching lines...) Expand all Loading... |
6889 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6846 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
6890 { | 6847 { |
6891 TestObjectV8Internal::xPathNSResolverMethodMethod(info); | 6848 TestObjectV8Internal::xPathNSResolverMethodMethod(info); |
6892 } | 6849 } |
6893 | 6850 |
6894 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6851 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
6895 { | 6852 { |
6896 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); | 6853 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
6897 if (UNLIKELY(info.Length() < 1)) { | 6854 if (UNLIKELY(info.Length() < 1)) { |
6898 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6855 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6899 exceptionState.throwIfNeeded(); | |
6900 return; | 6856 return; |
6901 } | 6857 } |
6902 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6858 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6903 Dictionary dictionaryArg; | 6859 Dictionary dictionaryArg; |
6904 { | 6860 { |
6905 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 6861 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
6906 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not
an object."); | 6862 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not
an object."); |
6907 exceptionState.throwIfNeeded(); | |
6908 return; | 6863 return; |
6909 } | 6864 } |
6910 dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); | 6865 dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); |
6911 if (exceptionState.throwIfNeeded()) | 6866 if (exceptionState.hadException()) |
6912 return; | 6867 return; |
6913 } | 6868 } |
6914 impl->voidMethodDictionaryArg(dictionaryArg); | 6869 impl->voidMethodDictionaryArg(dictionaryArg); |
6915 } | 6870 } |
6916 | 6871 |
6917 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6872 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
6918 { | 6873 { |
6919 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); | 6874 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); |
6920 } | 6875 } |
6921 | 6876 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6959 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6914 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
6960 { | 6915 { |
6961 TestObjectV8Internal::voidMethodPromiseArgMethod(info); | 6916 TestObjectV8Internal::voidMethodPromiseArgMethod(info); |
6962 } | 6917 } |
6963 | 6918 |
6964 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6919 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
6965 { | 6920 { |
6966 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); | 6921 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); |
6967 if (UNLIKELY(info.Length() < 1)) { | 6922 if (UNLIKELY(info.Length() < 1)) { |
6968 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6923 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
6969 exceptionState.throwIfNeeded(); | |
6970 return; | 6924 return; |
6971 } | 6925 } |
6972 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6926 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6973 RefPtr<SerializedScriptValue> serializedScriptValueArg; | 6927 RefPtr<SerializedScriptValue> serializedScriptValueArg; |
6974 { | 6928 { |
6975 serializedScriptValueArg = SerializedScriptValue::serialize(info.GetIsol
ate(), info[0], nullptr, nullptr, exceptionState); | 6929 serializedScriptValueArg = SerializedScriptValue::serialize(info.GetIsol
ate(), info[0], nullptr, nullptr, exceptionState); |
6976 if (exceptionState.throwIfNeeded()) | 6930 if (exceptionState.hadException()) |
6977 return; | 6931 return; |
6978 } | 6932 } |
6979 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); | 6933 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); |
6980 } | 6934 } |
6981 | 6935 |
6982 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6936 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
6983 { | 6937 { |
6984 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | 6938 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); |
6985 } | 6939 } |
6986 | 6940 |
(...skipping 18 matching lines...) Expand all Loading... |
7005 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6959 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
7006 { | 6960 { |
7007 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); | 6961 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); |
7008 } | 6962 } |
7009 | 6963 |
7010 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6964 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
7011 { | 6965 { |
7012 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); | 6966 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
ictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
7013 if (UNLIKELY(info.Length() < 1)) { | 6967 if (UNLIKELY(info.Length() < 1)) { |
7014 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6968 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7015 exceptionState.throwIfNeeded(); | |
7016 return; | 6969 return; |
7017 } | 6970 } |
7018 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6971 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7019 Vector<Dictionary> dictionarySequenceArg; | 6972 Vector<Dictionary> dictionarySequenceArg; |
7020 { | 6973 { |
7021 dictionarySequenceArg = toImplArray<Vector<Dictionary>>(info[0], 1, info
.GetIsolate(), exceptionState); | 6974 dictionarySequenceArg = toImplArray<Vector<Dictionary>>(info[0], 1, info
.GetIsolate(), exceptionState); |
7022 if (exceptionState.throwIfNeeded()) | 6975 if (exceptionState.hadException()) |
7023 return; | 6976 return; |
7024 } | 6977 } |
7025 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); | 6978 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); |
7026 } | 6979 } |
7027 | 6980 |
7028 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 6981 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
7029 { | 6982 { |
7030 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); | 6983 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); |
7031 } | 6984 } |
7032 | 6985 |
7033 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 6986 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
7034 { | 6987 { |
7035 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 6988 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7036 if (UNLIKELY(info.Length() < 2)) { | 6989 if (UNLIKELY(info.Length() < 2)) { |
7037 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 6990 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
7038 exceptionState.throwIfNeeded(); | |
7039 return; | 6991 return; |
7040 } | 6992 } |
7041 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6993 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7042 V8StringResource<> stringArg; | 6994 V8StringResource<> stringArg; |
7043 int longArg; | 6995 int longArg; |
7044 { | 6996 { |
7045 stringArg = info[0]; | 6997 stringArg = info[0]; |
7046 if (!stringArg.prepare()) | 6998 if (!stringArg.prepare()) |
7047 return; | 6999 return; |
7048 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio
nState); | 7000 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio
nState); |
7049 if (exceptionState.throwIfNeeded()) | 7001 if (exceptionState.hadException()) |
7050 return; | 7002 return; |
7051 } | 7003 } |
7052 impl->voidMethodStringArgLongArg(stringArg, longArg); | 7004 impl->voidMethodStringArgLongArg(stringArg, longArg); |
7053 } | 7005 } |
7054 | 7006 |
7055 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7007 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
7056 { | 7008 { |
7057 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); | 7009 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); |
7058 } | 7010 } |
7059 | 7011 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7123 while (numArgsPassed > 0) { | 7075 while (numArgsPassed > 0) { |
7124 if (!info[numArgsPassed - 1]->IsUndefined()) | 7076 if (!info[numArgsPassed - 1]->IsUndefined()) |
7125 break; | 7077 break; |
7126 --numArgsPassed; | 7078 --numArgsPassed; |
7127 } | 7079 } |
7128 if (UNLIKELY(numArgsPassed <= 0)) { | 7080 if (UNLIKELY(numArgsPassed <= 0)) { |
7129 impl->voidMethodOptionalLongArg(); | 7081 impl->voidMethodOptionalLongArg(); |
7130 return; | 7082 return; |
7131 } | 7083 } |
7132 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 7084 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
7133 if (exceptionState.throwIfNeeded()) | 7085 if (exceptionState.hadException()) |
7134 return; | 7086 return; |
7135 } | 7087 } |
7136 impl->voidMethodOptionalLongArg(optionalLongArg); | 7088 impl->voidMethodOptionalLongArg(optionalLongArg); |
7137 } | 7089 } |
7138 | 7090 |
7139 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7091 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
7140 { | 7092 { |
7141 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); | 7093 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); |
7142 } | 7094 } |
7143 | 7095 |
7144 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7096 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7145 { | 7097 { |
7146 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7098 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7147 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7099 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7148 int optionalLongArg; | 7100 int optionalLongArg; |
7149 { | 7101 { |
7150 int numArgsPassed = info.Length(); | 7102 int numArgsPassed = info.Length(); |
7151 while (numArgsPassed > 0) { | 7103 while (numArgsPassed > 0) { |
7152 if (!info[numArgsPassed - 1]->IsUndefined()) | 7104 if (!info[numArgsPassed - 1]->IsUndefined()) |
7153 break; | 7105 break; |
7154 --numArgsPassed; | 7106 --numArgsPassed; |
7155 } | 7107 } |
7156 if (UNLIKELY(numArgsPassed <= 0)) { | 7108 if (UNLIKELY(numArgsPassed <= 0)) { |
7157 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in
fo.GetIsolate()); | 7109 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in
fo.GetIsolate()); |
7158 return; | 7110 return; |
7159 } | 7111 } |
7160 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 7112 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
7161 if (exceptionState.throwIfNeeded()) | 7113 if (exceptionState.hadException()) |
7162 return; | 7114 return; |
7163 } | 7115 } |
7164 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); | 7116 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); |
7165 } | 7117 } |
7166 | 7118 |
7167 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7119 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
7168 { | 7120 { |
7169 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); | 7121 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); |
7170 } | 7122 } |
7171 | 7123 |
7172 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7124 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
7173 { | 7125 { |
7174 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7126 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7175 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7127 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7176 int optionalLongArg; | 7128 int optionalLongArg; |
7177 { | 7129 { |
7178 int numArgsPassed = info.Length(); | 7130 int numArgsPassed = info.Length(); |
7179 while (numArgsPassed > 0) { | 7131 while (numArgsPassed > 0) { |
7180 if (!info[numArgsPassed - 1]->IsUndefined()) | 7132 if (!info[numArgsPassed - 1]->IsUndefined()) |
7181 break; | 7133 break; |
7182 --numArgsPassed; | 7134 --numArgsPassed; |
7183 } | 7135 } |
7184 if (UNLIKELY(numArgsPassed <= 0)) { | 7136 if (UNLIKELY(numArgsPassed <= 0)) { |
7185 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg
()); | 7137 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg
()); |
7186 return; | 7138 return; |
7187 } | 7139 } |
7188 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 7140 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
7189 if (exceptionState.throwIfNeeded()) | 7141 if (exceptionState.hadException()) |
7190 return; | 7142 return; |
7191 } | 7143 } |
7192 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); | 7144 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); |
7193 } | 7145 } |
7194 | 7146 |
7195 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7147 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7196 { | 7148 { |
7197 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); | 7149 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); |
7198 } | 7150 } |
7199 | 7151 |
7200 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7152 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7201 { | 7153 { |
7202 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7154 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7203 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7155 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7204 int optionalLongArg; | 7156 int optionalLongArg; |
7205 { | 7157 { |
7206 int numArgsPassed = info.Length(); | 7158 int numArgsPassed = info.Length(); |
7207 while (numArgsPassed > 0) { | 7159 while (numArgsPassed > 0) { |
7208 if (!info[numArgsPassed - 1]->IsUndefined()) | 7160 if (!info[numArgsPassed - 1]->IsUndefined()) |
7209 break; | 7161 break; |
7210 --numArgsPassed; | 7162 --numArgsPassed; |
7211 } | 7163 } |
7212 if (UNLIKELY(numArgsPassed <= 0)) { | 7164 if (UNLIKELY(numArgsPassed <= 0)) { |
7213 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); | 7165 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); |
7214 return; | 7166 return; |
7215 } | 7167 } |
7216 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 7168 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
7217 if (exceptionState.throwIfNeeded()) | 7169 if (exceptionState.hadException()) |
7218 return; | 7170 return; |
7219 } | 7171 } |
7220 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); | 7172 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); |
7221 } | 7173 } |
7222 | 7174 |
7223 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7175 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
7224 { | 7176 { |
7225 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); | 7177 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); |
7226 } | 7178 } |
7227 | 7179 |
7228 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 7180 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
7229 { | 7181 { |
7230 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7231 if (UNLIKELY(info.Length() < 1)) { | 7183 if (UNLIKELY(info.Length() < 1)) { |
7232 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7184 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7233 exceptionState.throwIfNeeded(); | |
7234 return; | 7185 return; |
7235 } | 7186 } |
7236 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7187 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7237 int longArg; | 7188 int longArg; |
7238 int optionalLongArg; | 7189 int optionalLongArg; |
7239 { | 7190 { |
7240 int numArgsPassed = info.Length(); | 7191 int numArgsPassed = info.Length(); |
7241 while (numArgsPassed > 0) { | 7192 while (numArgsPassed > 0) { |
7242 if (!info[numArgsPassed - 1]->IsUndefined()) | 7193 if (!info[numArgsPassed - 1]->IsUndefined()) |
7243 break; | 7194 break; |
7244 --numArgsPassed; | 7195 --numArgsPassed; |
7245 } | 7196 } |
7246 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7197 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
7247 if (exceptionState.throwIfNeeded()) | 7198 if (exceptionState.hadException()) |
7248 return; | 7199 return; |
7249 if (UNLIKELY(numArgsPassed <= 1)) { | 7200 if (UNLIKELY(numArgsPassed <= 1)) { |
7250 impl->voidMethodLongArgOptionalLongArg(longArg); | 7201 impl->voidMethodLongArgOptionalLongArg(longArg); |
7251 return; | 7202 return; |
7252 } | 7203 } |
7253 optionalLongArg = toInt32(info.GetIsolate(), info[1], NormalConversion,
exceptionState); | 7204 optionalLongArg = toInt32(info.GetIsolate(), info[1], NormalConversion,
exceptionState); |
7254 if (exceptionState.throwIfNeeded()) | 7205 if (exceptionState.hadException()) |
7255 return; | 7206 return; |
7256 } | 7207 } |
7257 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); | 7208 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); |
7258 } | 7209 } |
7259 | 7210 |
7260 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 7211 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
7261 { | 7212 { |
7262 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); | 7213 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); |
7263 } | 7214 } |
7264 | 7215 |
7265 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7216 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7266 { | 7217 { |
7267 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); | 7218 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); |
7268 if (UNLIKELY(info.Length() < 1)) { | 7219 if (UNLIKELY(info.Length() < 1)) { |
7269 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7220 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7270 exceptionState.throwIfNeeded(); | |
7271 return; | 7221 return; |
7272 } | 7222 } |
7273 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7223 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7274 int longArg; | 7224 int longArg; |
7275 int optionalLongArg1; | 7225 int optionalLongArg1; |
7276 int optionalLongArg2; | 7226 int optionalLongArg2; |
7277 { | 7227 { |
7278 int numArgsPassed = info.Length(); | 7228 int numArgsPassed = info.Length(); |
7279 while (numArgsPassed > 0) { | 7229 while (numArgsPassed > 0) { |
7280 if (!info[numArgsPassed - 1]->IsUndefined()) | 7230 if (!info[numArgsPassed - 1]->IsUndefined()) |
7281 break; | 7231 break; |
7282 --numArgsPassed; | 7232 --numArgsPassed; |
7283 } | 7233 } |
7284 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7234 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
7285 if (exceptionState.throwIfNeeded()) | 7235 if (exceptionState.hadException()) |
7286 return; | 7236 return; |
7287 if (UNLIKELY(numArgsPassed <= 1)) { | 7237 if (UNLIKELY(numArgsPassed <= 1)) { |
7288 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); | 7238 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); |
7289 return; | 7239 return; |
7290 } | 7240 } |
7291 optionalLongArg1 = toInt32(info.GetIsolate(), info[1], NormalConversion,
exceptionState); | 7241 optionalLongArg1 = toInt32(info.GetIsolate(), info[1], NormalConversion,
exceptionState); |
7292 if (exceptionState.throwIfNeeded()) | 7242 if (exceptionState.hadException()) |
7293 return; | 7243 return; |
7294 if (UNLIKELY(numArgsPassed <= 2)) { | 7244 if (UNLIKELY(numArgsPassed <= 2)) { |
7295 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optio
nalLongArg1); | 7245 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optio
nalLongArg1); |
7296 return; | 7246 return; |
7297 } | 7247 } |
7298 optionalLongArg2 = toInt32(info.GetIsolate(), info[2], NormalConversion,
exceptionState); | 7248 optionalLongArg2 = toInt32(info.GetIsolate(), info[2], NormalConversion,
exceptionState); |
7299 if (exceptionState.throwIfNeeded()) | 7249 if (exceptionState.hadException()) |
7300 return; | 7250 return; |
7301 } | 7251 } |
7302 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA
rg1, optionalLongArg2); | 7252 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA
rg1, optionalLongArg2); |
7303 } | 7253 } |
7304 | 7254 |
7305 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 7255 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
7306 { | 7256 { |
7307 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(
info); | 7257 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(
info); |
7308 } | 7258 } |
7309 | 7259 |
7310 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7260 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
7311 { | 7261 { |
7312 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); | 7262 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); |
7313 if (UNLIKELY(info.Length() < 1)) { | 7263 if (UNLIKELY(info.Length() < 1)) { |
7314 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7264 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7315 exceptionState.throwIfNeeded(); | |
7316 return; | 7265 return; |
7317 } | 7266 } |
7318 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7267 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7319 int longArg; | 7268 int longArg; |
7320 TestInterfaceEmpty* optionalTestInterfaceEmpty; | 7269 TestInterfaceEmpty* optionalTestInterfaceEmpty; |
7321 { | 7270 { |
7322 int numArgsPassed = info.Length(); | 7271 int numArgsPassed = info.Length(); |
7323 while (numArgsPassed > 0) { | 7272 while (numArgsPassed > 0) { |
7324 if (!info[numArgsPassed - 1]->IsUndefined()) | 7273 if (!info[numArgsPassed - 1]->IsUndefined()) |
7325 break; | 7274 break; |
7326 --numArgsPassed; | 7275 --numArgsPassed; |
7327 } | 7276 } |
7328 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7277 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
7329 if (exceptionState.throwIfNeeded()) | 7278 if (exceptionState.hadException()) |
7330 return; | 7279 return; |
7331 if (UNLIKELY(numArgsPassed <= 1)) { | 7280 if (UNLIKELY(numArgsPassed <= 1)) { |
7332 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); | 7281 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); |
7333 return; | 7282 return; |
7334 } | 7283 } |
7335 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(i
nfo.GetIsolate(), info[1]); | 7284 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(i
nfo.GetIsolate(), info[1]); |
7336 if (!optionalTestInterfaceEmpty) { | 7285 if (!optionalTestInterfaceEmpty) { |
7337 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); | 7286 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); |
7338 exceptionState.throwIfNeeded(); | |
7339 return; | 7287 return; |
7340 } | 7288 } |
7341 } | 7289 } |
7342 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); | 7290 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); |
7343 } | 7291 } |
7344 | 7292 |
7345 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7293 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
7346 { | 7294 { |
7347 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); | 7295 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); |
7348 } | 7296 } |
7349 | 7297 |
7350 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7298 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
7351 { | 7299 { |
7352 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); | 7300 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); |
7353 if (UNLIKELY(info.Length() < 1)) { | 7301 if (UNLIKELY(info.Length() < 1)) { |
7354 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7302 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7355 exceptionState.throwIfNeeded(); | |
7356 return; | 7303 return; |
7357 } | 7304 } |
7358 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7305 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7359 TestInterfaceEmpty* optionalTestInterfaceEmpty; | 7306 TestInterfaceEmpty* optionalTestInterfaceEmpty; |
7360 int longArg; | 7307 int longArg; |
7361 { | 7308 { |
7362 int numArgsPassed = info.Length(); | 7309 int numArgsPassed = info.Length(); |
7363 while (numArgsPassed > 0) { | 7310 while (numArgsPassed > 0) { |
7364 if (!info[numArgsPassed - 1]->IsUndefined()) | 7311 if (!info[numArgsPassed - 1]->IsUndefined()) |
7365 break; | 7312 break; |
7366 --numArgsPassed; | 7313 --numArgsPassed; |
7367 } | 7314 } |
7368 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(i
nfo.GetIsolate(), info[0]); | 7315 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(i
nfo.GetIsolate(), info[0]); |
7369 if (!optionalTestInterfaceEmpty) { | 7316 if (!optionalTestInterfaceEmpty) { |
7370 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter
faceEmpty'."); | 7317 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter
faceEmpty'."); |
7371 exceptionState.throwIfNeeded(); | |
7372 return; | 7318 return; |
7373 } | 7319 } |
7374 if (UNLIKELY(numArgsPassed <= 1)) { | 7320 if (UNLIKELY(numArgsPassed <= 1)) { |
7375 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt
erfaceEmpty); | 7321 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt
erfaceEmpty); |
7376 return; | 7322 return; |
7377 } | 7323 } |
7378 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio
nState); | 7324 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio
nState); |
7379 if (exceptionState.throwIfNeeded()) | 7325 if (exceptionState.hadException()) |
7380 return; | 7326 return; |
7381 } | 7327 } |
7382 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); | 7328 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); |
7383 } | 7329 } |
7384 | 7330 |
7385 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7331 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
7386 { | 7332 { |
7387 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); | 7333 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); |
7388 } | 7334 } |
7389 | 7335 |
7390 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 7336 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
7391 { | 7337 { |
7392 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); | 7338 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
7393 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7339 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7394 Dictionary optionalDictionaryArg; | 7340 Dictionary optionalDictionaryArg; |
7395 { | 7341 { |
7396 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 7342 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
7397 exceptionState.throwTypeError("parameter 1 ('optionalDictionaryArg')
is not an object."); | 7343 exceptionState.throwTypeError("parameter 1 ('optionalDictionaryArg')
is not an object."); |
7398 exceptionState.throwIfNeeded(); | |
7399 return; | 7344 return; |
7400 } | 7345 } |
7401 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate(), exception
State); | 7346 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate(), exception
State); |
7402 if (exceptionState.throwIfNeeded()) | 7347 if (exceptionState.hadException()) |
7403 return; | 7348 return; |
7404 } | 7349 } |
7405 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); | 7350 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); |
7406 } | 7351 } |
7407 | 7352 |
7408 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 7353 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
7409 { | 7354 { |
7410 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); | 7355 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); |
7411 } | 7356 } |
7412 | 7357 |
7413 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 7358 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
7414 { | 7359 { |
7415 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 7360 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
7416 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7361 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7417 V8StringResource<> defaultByteStringArg; | 7362 V8StringResource<> defaultByteStringArg; |
7418 { | 7363 { |
7419 if (!info[0]->IsUndefined()) { | 7364 if (!info[0]->IsUndefined()) { |
7420 defaultByteStringArg = toByteString(info.GetIsolate(), info[0], exce
ptionState); | 7365 defaultByteStringArg = toByteString(info.GetIsolate(), info[0], exce
ptionState); |
7421 if (exceptionState.throwIfNeeded()) | 7366 if (exceptionState.hadException()) |
7422 return; | 7367 return; |
7423 } else { | 7368 } else { |
7424 defaultByteStringArg = String("foo"); | 7369 defaultByteStringArg = String("foo"); |
7425 } | 7370 } |
7426 } | 7371 } |
7427 impl->voidMethodDefaultByteStringArg(defaultByteStringArg); | 7372 impl->voidMethodDefaultByteStringArg(defaultByteStringArg); |
7428 } | 7373 } |
7429 | 7374 |
7430 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 7375 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
7431 { | 7376 { |
(...skipping 24 matching lines...) Expand all Loading... |
7456 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 7401 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
7457 { | 7402 { |
7458 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); | 7403 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); |
7459 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7404 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7460 int defaultLongArg; | 7405 int defaultLongArg; |
7461 long long defaultLongLongArg; | 7406 long long defaultLongLongArg; |
7462 unsigned defaultUnsignedArg; | 7407 unsigned defaultUnsignedArg; |
7463 { | 7408 { |
7464 if (!info[0]->IsUndefined()) { | 7409 if (!info[0]->IsUndefined()) { |
7465 defaultLongArg = toInt32(info.GetIsolate(), info[0], NormalConversio
n, exceptionState); | 7410 defaultLongArg = toInt32(info.GetIsolate(), info[0], NormalConversio
n, exceptionState); |
7466 if (exceptionState.throwIfNeeded()) | 7411 if (exceptionState.hadException()) |
7467 return; | 7412 return; |
7468 } else { | 7413 } else { |
7469 defaultLongArg = 10; | 7414 defaultLongArg = 10; |
7470 } | 7415 } |
7471 if (!info[1]->IsUndefined()) { | 7416 if (!info[1]->IsUndefined()) { |
7472 defaultLongLongArg = toInt64(info.GetIsolate(), info[1], NormalConve
rsion, exceptionState); | 7417 defaultLongLongArg = toInt64(info.GetIsolate(), info[1], NormalConve
rsion, exceptionState); |
7473 if (exceptionState.throwIfNeeded()) | 7418 if (exceptionState.hadException()) |
7474 return; | 7419 return; |
7475 } else { | 7420 } else { |
7476 defaultLongLongArg = -10; | 7421 defaultLongLongArg = -10; |
7477 } | 7422 } |
7478 if (!info[2]->IsUndefined()) { | 7423 if (!info[2]->IsUndefined()) { |
7479 defaultUnsignedArg = toUInt32(info.GetIsolate(), info[2], NormalConv
ersion, exceptionState); | 7424 defaultUnsignedArg = toUInt32(info.GetIsolate(), info[2], NormalConv
ersion, exceptionState); |
7480 if (exceptionState.throwIfNeeded()) | 7425 if (exceptionState.hadException()) |
7481 return; | 7426 return; |
7482 } else { | 7427 } else { |
7483 defaultUnsignedArg = 4294967295u; | 7428 defaultUnsignedArg = 4294967295u; |
7484 } | 7429 } |
7485 } | 7430 } |
7486 impl->voidMethodDefaultIntegerArgs(defaultLongArg, defaultLongLongArg, defau
ltUnsignedArg); | 7431 impl->voidMethodDefaultIntegerArgs(defaultLongArg, defaultLongLongArg, defau
ltUnsignedArg); |
7487 } | 7432 } |
7488 | 7433 |
7489 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 7434 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
7490 { | 7435 { |
7491 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); | 7436 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); |
7492 } | 7437 } |
7493 | 7438 |
7494 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 7439 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
7495 { | 7440 { |
7496 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultDoubleArg", "TestObject", info.Holder(), info.GetIsolate()); | 7441 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultDoubleArg", "TestObject", info.Holder(), info.GetIsolate()); |
7497 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7442 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7498 double defaultDoubleArg; | 7443 double defaultDoubleArg; |
7499 { | 7444 { |
7500 if (!info[0]->IsUndefined()) { | 7445 if (!info[0]->IsUndefined()) { |
7501 defaultDoubleArg = toRestrictedDouble(info.GetIsolate(), info[0], ex
ceptionState); | 7446 defaultDoubleArg = toRestrictedDouble(info.GetIsolate(), info[0], ex
ceptionState); |
7502 if (exceptionState.throwIfNeeded()) | 7447 if (exceptionState.hadException()) |
7503 return; | 7448 return; |
7504 } else { | 7449 } else { |
7505 defaultDoubleArg = 0.5; | 7450 defaultDoubleArg = 0.5; |
7506 } | 7451 } |
7507 } | 7452 } |
7508 impl->voidMethodDefaultDoubleArg(defaultDoubleArg); | 7453 impl->voidMethodDefaultDoubleArg(defaultDoubleArg); |
7509 } | 7454 } |
7510 | 7455 |
7511 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7456 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
7512 { | 7457 { |
7513 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); | 7458 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); |
7514 } | 7459 } |
7515 | 7460 |
7516 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 7461 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
7517 { | 7462 { |
7518 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultTrueBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); | 7463 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultTrueBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
7519 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7464 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7520 bool defaultBooleanArg; | 7465 bool defaultBooleanArg; |
7521 { | 7466 { |
7522 if (!info[0]->IsUndefined()) { | 7467 if (!info[0]->IsUndefined()) { |
7523 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionS
tate); | 7468 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionS
tate); |
7524 if (exceptionState.throwIfNeeded()) | 7469 if (exceptionState.hadException()) |
7525 return; | 7470 return; |
7526 } else { | 7471 } else { |
7527 defaultBooleanArg = true; | 7472 defaultBooleanArg = true; |
7528 } | 7473 } |
7529 } | 7474 } |
7530 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); | 7475 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); |
7531 } | 7476 } |
7532 | 7477 |
7533 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 7478 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
7534 { | 7479 { |
7535 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); | 7480 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); |
7536 } | 7481 } |
7537 | 7482 |
7538 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 7483 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
7539 { | 7484 { |
7540 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultFalseBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); | 7485 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultFalseBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
7541 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7486 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7542 bool defaultBooleanArg; | 7487 bool defaultBooleanArg; |
7543 { | 7488 { |
7544 if (!info[0]->IsUndefined()) { | 7489 if (!info[0]->IsUndefined()) { |
7545 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionS
tate); | 7490 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionS
tate); |
7546 if (exceptionState.throwIfNeeded()) | 7491 if (exceptionState.hadException()) |
7547 return; | 7492 return; |
7548 } else { | 7493 } else { |
7549 defaultBooleanArg = false; | 7494 defaultBooleanArg = false; |
7550 } | 7495 } |
7551 } | 7496 } |
7552 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); | 7497 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); |
7553 } | 7498 } |
7554 | 7499 |
7555 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 7500 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
7556 { | 7501 { |
7557 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); | 7502 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); |
7558 } | 7503 } |
7559 | 7504 |
7560 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 7505 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
7561 { | 7506 { |
7562 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 7507 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
7563 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7508 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7564 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg; | 7509 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg; |
7565 { | 7510 { |
7566 if (!info[0]->IsUndefined()) { | 7511 if (!info[0]->IsUndefined()) { |
7567 defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptio
nState); | 7512 defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptio
nState); |
7568 if (exceptionState.throwIfNeeded()) | 7513 if (exceptionState.hadException()) |
7569 return; | 7514 return; |
7570 } else { | 7515 } else { |
7571 defaultStringArg = nullptr; | 7516 defaultStringArg = nullptr; |
7572 } | 7517 } |
7573 } | 7518 } |
7574 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); | 7519 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); |
7575 } | 7520 } |
7576 | 7521 |
7577 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7522 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
7578 { | 7523 { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7626 static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 7571 static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
7627 { | 7572 { |
7628 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultDoubleOrStringArgs", "TestObject", info.Holder(), info.GetIsolate()); | 7573 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultDoubleOrStringArgs", "TestObject", info.Holder(), info.GetIsolate()); |
7629 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7574 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7630 DoubleOrString defaultLongArg; | 7575 DoubleOrString defaultLongArg; |
7631 DoubleOrString defaultStringArg; | 7576 DoubleOrString defaultStringArg; |
7632 DoubleOrString defaultNullArg; | 7577 DoubleOrString defaultNullArg; |
7633 { | 7578 { |
7634 if (!info[0]->IsUndefined()) { | 7579 if (!info[0]->IsUndefined()) { |
7635 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], defaultLongArg,
UnionTypeConversionMode::NotNullable, exceptionState); | 7580 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], defaultLongArg,
UnionTypeConversionMode::NotNullable, exceptionState); |
7636 if (exceptionState.throwIfNeeded()) | 7581 if (exceptionState.hadException()) |
7637 return; | 7582 return; |
7638 } else { | 7583 } else { |
7639 defaultLongArg.setDouble(10); | 7584 defaultLongArg.setDouble(10); |
7640 } | 7585 } |
7641 if (!info[1]->IsUndefined()) { | 7586 if (!info[1]->IsUndefined()) { |
7642 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), info[1], defaultSt
ringArg, UnionTypeConversionMode::Nullable, exceptionState); | 7587 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), info[1], defaultSt
ringArg, UnionTypeConversionMode::Nullable, exceptionState); |
7643 if (exceptionState.throwIfNeeded()) | 7588 if (exceptionState.hadException()) |
7644 return; | 7589 return; |
7645 } else { | 7590 } else { |
7646 defaultStringArg.setString(String("foo")); | 7591 defaultStringArg.setString(String("foo")); |
7647 } | 7592 } |
7648 if (!info[2]->IsUndefined()) { | 7593 if (!info[2]->IsUndefined()) { |
7649 V8DoubleOrString::toImpl(info.GetIsolate(), info[2], defaultNullArg,
UnionTypeConversionMode::Nullable, exceptionState); | 7594 V8DoubleOrString::toImpl(info.GetIsolate(), info[2], defaultNullArg,
UnionTypeConversionMode::Nullable, exceptionState); |
7650 if (exceptionState.throwIfNeeded()) | 7595 if (exceptionState.hadException()) |
7651 return; | 7596 return; |
7652 } else { | 7597 } else { |
7653 /* null default value */; | 7598 /* null default value */; |
7654 } | 7599 } |
7655 } | 7600 } |
7656 impl->voidMethodDefaultDoubleOrStringArgs(defaultLongArg, defaultStringArg,
defaultNullArg); | 7601 impl->voidMethodDefaultDoubleOrStringArgs(defaultLongArg, defaultStringArg,
defaultNullArg); |
7657 } | 7602 } |
7658 | 7603 |
7659 static void voidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 7604 static void voidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
7660 { | 7605 { |
7661 TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethod(info); | 7606 TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethod(info); |
7662 } | 7607 } |
7663 | 7608 |
7664 static void voidMethodDefaultStringSequenceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7609 static void voidMethodDefaultStringSequenceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
7665 { | 7610 { |
7666 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultStringSequenceArg", "TestObject", info.Holder(), info.GetIsolate()); | 7611 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultStringSequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
7667 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7612 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7668 Vector<String> defaultStringSequenceArg; | 7613 Vector<String> defaultStringSequenceArg; |
7669 { | 7614 { |
7670 if (!info[0]->IsUndefined()) { | 7615 if (!info[0]->IsUndefined()) { |
7671 defaultStringSequenceArg = toImplArray<Vector<String>>(info[0], 1, i
nfo.GetIsolate(), exceptionState); | 7616 defaultStringSequenceArg = toImplArray<Vector<String>>(info[0], 1, i
nfo.GetIsolate(), exceptionState); |
7672 if (exceptionState.throwIfNeeded()) | 7617 if (exceptionState.hadException()) |
7673 return; | 7618 return; |
7674 } else { | 7619 } else { |
7675 /* Nothing to do */; | 7620 /* Nothing to do */; |
7676 } | 7621 } |
7677 } | 7622 } |
7678 impl->voidMethodDefaultStringSequenceArg(defaultStringSequenceArg); | 7623 impl->voidMethodDefaultStringSequenceArg(defaultStringSequenceArg); |
7679 } | 7624 } |
7680 | 7625 |
7681 static void voidMethodDefaultStringSequenceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 7626 static void voidMethodDefaultStringSequenceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
7682 { | 7627 { |
7683 TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethod(info); | 7628 TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethod(info); |
7684 } | 7629 } |
7685 | 7630 |
7686 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7631 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7687 { | 7632 { |
7688 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 7633 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
7689 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7634 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7690 Vector<String> variadicStringArgs; | 7635 Vector<String> variadicStringArgs; |
7691 { | 7636 { |
7692 variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionS
tate); | 7637 variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionS
tate); |
7693 if (exceptionState.throwIfNeeded()) | 7638 if (exceptionState.hadException()) |
7694 return; | 7639 return; |
7695 } | 7640 } |
7696 impl->voidMethodVariadicStringArg(variadicStringArgs); | 7641 impl->voidMethodVariadicStringArg(variadicStringArgs); |
7697 } | 7642 } |
7698 | 7643 |
7699 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7644 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
7700 { | 7645 { |
7701 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); | 7646 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); |
7702 } | 7647 } |
7703 | 7648 |
7704 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 7649 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
7705 { | 7650 { |
7706 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgVariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 7651 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgVariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
7707 if (UNLIKELY(info.Length() < 1)) { | 7652 if (UNLIKELY(info.Length() < 1)) { |
7708 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7653 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7709 exceptionState.throwIfNeeded(); | |
7710 return; | 7654 return; |
7711 } | 7655 } |
7712 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7656 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7713 V8StringResource<> stringArg; | 7657 V8StringResource<> stringArg; |
7714 Vector<String> variadicStringArgs; | 7658 Vector<String> variadicStringArgs; |
7715 { | 7659 { |
7716 stringArg = info[0]; | 7660 stringArg = info[0]; |
7717 if (!stringArg.prepare()) | 7661 if (!stringArg.prepare()) |
7718 return; | 7662 return; |
7719 variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionS
tate); | 7663 variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionS
tate); |
7720 if (exceptionState.throwIfNeeded()) | 7664 if (exceptionState.hadException()) |
7721 return; | 7665 return; |
7722 } | 7666 } |
7723 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); | 7667 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); |
7724 } | 7668 } |
7725 | 7669 |
7726 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 7670 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
7727 { | 7671 { |
7728 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); | 7672 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); |
7729 } | 7673 } |
7730 | 7674 |
7731 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7675 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
7732 { | 7676 { |
7733 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 7677 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
7734 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7678 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7735 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; | 7679 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; |
7736 { | 7680 { |
7737 for (int i = 0; i < info.Length(); ++i) { | 7681 for (int i = 0; i < info.Length(); ++i) { |
7738 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7682 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
7739 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); | 7683 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); |
7740 exceptionState.throwIfNeeded(); | |
7741 return; | 7684 return; |
7742 } | 7685 } |
7743 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); | 7686 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); |
7744 } | 7687 } |
7745 } | 7688 } |
7746 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); | 7689 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); |
7747 } | 7690 } |
7748 | 7691 |
7749 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7692 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7750 { | 7693 { |
7751 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); | 7694 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); |
7752 } | 7695 } |
7753 | 7696 |
7754 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 7697 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
7755 { | 7698 { |
7756 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(),
info.GetIsolate()); | 7699 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(),
info.GetIsolate()); |
7757 if (UNLIKELY(info.Length() < 1)) { | 7700 if (UNLIKELY(info.Length() < 1)) { |
7758 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7701 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7759 exceptionState.throwIfNeeded(); | |
7760 return; | 7702 return; |
7761 } | 7703 } |
7762 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7704 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7763 TestInterfaceEmpty* testInterfaceEmptyArg; | 7705 TestInterfaceEmpty* testInterfaceEmptyArg; |
7764 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; | 7706 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; |
7765 { | 7707 { |
7766 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 7708 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
7767 if (!testInterfaceEmptyArg) { | 7709 if (!testInterfaceEmptyArg) { |
7768 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter
faceEmpty'."); | 7710 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter
faceEmpty'."); |
7769 exceptionState.throwIfNeeded(); | |
7770 return; | 7711 return; |
7771 } | 7712 } |
7772 for (int i = 1; i < info.Length(); ++i) { | 7713 for (int i = 1; i < info.Length(); ++i) { |
7773 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7714 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
7774 exceptionState.throwTypeError("parameter 2 is not of type 'TestI
nterfaceEmpty'."); | 7715 exceptionState.throwTypeError("parameter 2 is not of type 'TestI
nterfaceEmpty'."); |
7775 exceptionState.throwIfNeeded(); | |
7776 return; | 7716 return; |
7777 } | 7717 } |
7778 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); | 7718 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Local<v8::Object>::Cast(info[i]))); |
7779 } | 7719 } |
7780 } | 7720 } |
7781 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); | 7721 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); |
7782 } | 7722 } |
7783 | 7723 |
7784 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | 7724 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
7785 { | 7725 { |
7786 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); | 7726 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); |
7787 } | 7727 } |
7788 | 7728 |
7789 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | 7729 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) |
7790 { | 7730 { |
7791 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceGarbageCollectedArg", "TestObject", info.Holder(), info.GetI
solate()); | 7731 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV
ariadicTestInterfaceGarbageCollectedArg", "TestObject", info.Holder(), info.GetI
solate()); |
7792 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7732 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7793 HeapVector<Member<TestInterfaceGarbageCollected>> variadicTestInterfaceGarba
geCollectedArg; | 7733 HeapVector<Member<TestInterfaceGarbageCollected>> variadicTestInterfaceGarba
geCollectedArg; |
7794 { | 7734 { |
7795 for (int i = 0; i < info.Length(); ++i) { | 7735 for (int i = 0; i < info.Length(); ++i) { |
7796 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { | 7736 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { |
7797 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceGarbageCollected'."); | 7737 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceGarbageCollected'."); |
7798 exceptionState.throwIfNeeded(); | |
7799 return; | 7738 return; |
7800 } | 7739 } |
7801 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toImpl(v8::Local<v8::Object>::Cast(info[i]))); | 7740 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
7802 } | 7741 } |
7803 } | 7742 } |
7804 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); | 7743 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); |
7805 } | 7744 } |
7806 | 7745 |
7807 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 7746 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
7808 { | 7747 { |
7809 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); | 7748 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); |
7810 } | 7749 } |
7811 | 7750 |
7812 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7751 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7813 { | 7752 { |
7814 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 7753 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
7815 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7754 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7816 int longArg; | 7755 int longArg; |
7817 { | 7756 { |
7818 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7757 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
7819 if (exceptionState.throwIfNeeded()) | 7758 if (exceptionState.hadException()) |
7820 return; | 7759 return; |
7821 } | 7760 } |
7822 impl->overloadedMethodA(longArg); | 7761 impl->overloadedMethodA(longArg); |
7823 } | 7762 } |
7824 | 7763 |
7825 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7764 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7826 { | 7765 { |
7827 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 7766 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
7828 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7767 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7829 int longArg1; | 7768 int longArg1; |
7830 int longArg2; | 7769 int longArg2; |
7831 { | 7770 { |
7832 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, excepti
onState); | 7771 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, excepti
onState); |
7833 if (exceptionState.throwIfNeeded()) | 7772 if (exceptionState.hadException()) |
7834 return; | 7773 return; |
7835 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, excepti
onState); | 7774 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, excepti
onState); |
7836 if (exceptionState.throwIfNeeded()) | 7775 if (exceptionState.hadException()) |
7837 return; | 7776 return; |
7838 } | 7777 } |
7839 impl->overloadedMethodA(longArg1, longArg2); | 7778 impl->overloadedMethodA(longArg1, longArg2); |
7840 } | 7779 } |
7841 | 7780 |
7842 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7781 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
7843 { | 7782 { |
7844 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 7783 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
7845 switch (std::min(2, info.Length())) { | 7784 switch (std::min(2, info.Length())) { |
7846 case 1: | 7785 case 1: |
7847 if (true) { | 7786 if (true) { |
7848 overloadedMethodA1Method(info); | 7787 overloadedMethodA1Method(info); |
7849 return; | 7788 return; |
7850 } | 7789 } |
7851 break; | 7790 break; |
7852 case 2: | 7791 case 2: |
7853 if (true) { | 7792 if (true) { |
7854 overloadedMethodA2Method(info); | 7793 overloadedMethodA2Method(info); |
7855 return; | 7794 return; |
7856 } | 7795 } |
7857 break; | 7796 break; |
7858 default: | 7797 default: |
7859 break; | 7798 break; |
7860 } | 7799 } |
7861 if (info.Length() < 1) { | 7800 if (info.Length() < 1) { |
7862 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 7801 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
7863 exceptionState.throwIfNeeded(); | |
7864 return; | 7802 return; |
7865 } | 7803 } |
7866 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 7804 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
7867 exceptionState.throwIfNeeded(); | |
7868 return; | 7805 return; |
7869 } | 7806 } |
7870 | 7807 |
7871 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7808 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7872 { | 7809 { |
7873 TestObjectV8Internal::overloadedMethodAMethod(info); | 7810 TestObjectV8Internal::overloadedMethodAMethod(info); |
7874 } | 7811 } |
7875 | 7812 |
7876 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7813 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7877 { | 7814 { |
7878 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7815 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
7879 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7816 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7880 int longArg; | 7817 int longArg; |
7881 { | 7818 { |
7882 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7819 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
7883 if (exceptionState.throwIfNeeded()) | 7820 if (exceptionState.hadException()) |
7884 return; | 7821 return; |
7885 } | 7822 } |
7886 impl->overloadedMethodB(longArg); | 7823 impl->overloadedMethodB(longArg); |
7887 } | 7824 } |
7888 | 7825 |
7889 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7826 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7890 { | 7827 { |
7891 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7828 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
7892 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7829 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7893 V8StringResource<> stringArg; | 7830 V8StringResource<> stringArg; |
7894 int longArg; | 7831 int longArg; |
7895 { | 7832 { |
7896 int numArgsPassed = info.Length(); | 7833 int numArgsPassed = info.Length(); |
7897 while (numArgsPassed > 0) { | 7834 while (numArgsPassed > 0) { |
7898 if (!info[numArgsPassed - 1]->IsUndefined()) | 7835 if (!info[numArgsPassed - 1]->IsUndefined()) |
7899 break; | 7836 break; |
7900 --numArgsPassed; | 7837 --numArgsPassed; |
7901 } | 7838 } |
7902 stringArg = info[0]; | 7839 stringArg = info[0]; |
7903 if (!stringArg.prepare()) | 7840 if (!stringArg.prepare()) |
7904 return; | 7841 return; |
7905 if (UNLIKELY(numArgsPassed <= 1)) { | 7842 if (UNLIKELY(numArgsPassed <= 1)) { |
7906 impl->overloadedMethodB(stringArg); | 7843 impl->overloadedMethodB(stringArg); |
7907 return; | 7844 return; |
7908 } | 7845 } |
7909 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio
nState); | 7846 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio
nState); |
7910 if (exceptionState.throwIfNeeded()) | 7847 if (exceptionState.hadException()) |
7911 return; | 7848 return; |
7912 } | 7849 } |
7913 impl->overloadedMethodB(stringArg, longArg); | 7850 impl->overloadedMethodB(stringArg, longArg); |
7914 } | 7851 } |
7915 | 7852 |
7916 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7853 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
7917 { | 7854 { |
7918 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7855 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
7919 switch (std::min(2, info.Length())) { | 7856 switch (std::min(2, info.Length())) { |
7920 case 1: | 7857 case 1: |
(...skipping 14 matching lines...) Expand all Loading... |
7935 if (true) { | 7872 if (true) { |
7936 overloadedMethodB2Method(info); | 7873 overloadedMethodB2Method(info); |
7937 return; | 7874 return; |
7938 } | 7875 } |
7939 break; | 7876 break; |
7940 default: | 7877 default: |
7941 break; | 7878 break; |
7942 } | 7879 } |
7943 if (info.Length() < 1) { | 7880 if (info.Length() < 1) { |
7944 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 7881 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
7945 exceptionState.throwIfNeeded(); | |
7946 return; | 7882 return; |
7947 } | 7883 } |
7948 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 7884 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
7949 exceptionState.throwIfNeeded(); | |
7950 return; | 7885 return; |
7951 } | 7886 } |
7952 | 7887 |
7953 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7888 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7954 { | 7889 { |
7955 TestObjectV8Internal::overloadedMethodBMethod(info); | 7890 TestObjectV8Internal::overloadedMethodBMethod(info); |
7956 } | 7891 } |
7957 | 7892 |
7958 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7893 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7959 { | 7894 { |
7960 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | 7895 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); |
7961 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7896 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7962 int longArg; | 7897 int longArg; |
7963 { | 7898 { |
7964 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7899 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
7965 if (exceptionState.throwIfNeeded()) | 7900 if (exceptionState.hadException()) |
7966 return; | 7901 return; |
7967 } | 7902 } |
7968 impl->overloadedMethodC(longArg); | 7903 impl->overloadedMethodC(longArg); |
7969 } | 7904 } |
7970 | 7905 |
7971 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7906 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7972 { | 7907 { |
7973 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7908 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
7974 TestInterfaceEmpty* testInterfaceEmptyArg; | 7909 TestInterfaceEmpty* testInterfaceEmptyArg; |
7975 { | 7910 { |
(...skipping 18 matching lines...) Expand all Loading... |
7994 if (true) { | 7929 if (true) { |
7995 overloadedMethodC1Method(info); | 7930 overloadedMethodC1Method(info); |
7996 return; | 7931 return; |
7997 } | 7932 } |
7998 break; | 7933 break; |
7999 default: | 7934 default: |
8000 break; | 7935 break; |
8001 } | 7936 } |
8002 if (info.Length() < 1) { | 7937 if (info.Length() < 1) { |
8003 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 7938 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8004 exceptionState.throwIfNeeded(); | |
8005 return; | 7939 return; |
8006 } | 7940 } |
8007 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 7941 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8008 exceptionState.throwIfNeeded(); | |
8009 return; | 7942 return; |
8010 } | 7943 } |
8011 | 7944 |
8012 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7945 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8013 { | 7946 { |
8014 TestObjectV8Internal::overloadedMethodCMethod(info); | 7947 TestObjectV8Internal::overloadedMethodCMethod(info); |
8015 } | 7948 } |
8016 | 7949 |
8017 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7950 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8018 { | 7951 { |
8019 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | 7952 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); |
8020 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7953 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8021 int longArg; | 7954 int longArg; |
8022 { | 7955 { |
8023 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 7956 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8024 if (exceptionState.throwIfNeeded()) | 7957 if (exceptionState.hadException()) |
8025 return; | 7958 return; |
8026 } | 7959 } |
8027 impl->overloadedMethodD(longArg); | 7960 impl->overloadedMethodD(longArg); |
8028 } | 7961 } |
8029 | 7962 |
8030 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7963 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8031 { | 7964 { |
8032 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | 7965 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); |
8033 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7966 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8034 Vector<int> longArrayArg; | 7967 Vector<int> longArrayArg; |
8035 { | 7968 { |
8036 longArrayArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e
xceptionState); | 7969 longArrayArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e
xceptionState); |
8037 if (exceptionState.throwIfNeeded()) | 7970 if (exceptionState.hadException()) |
8038 return; | 7971 return; |
8039 } | 7972 } |
8040 impl->overloadedMethodD(longArrayArg); | 7973 impl->overloadedMethodD(longArrayArg); |
8041 } | 7974 } |
8042 | 7975 |
8043 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7976 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
8044 { | 7977 { |
8045 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | 7978 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); |
8046 switch (std::min(1, info.Length())) { | 7979 switch (std::min(1, info.Length())) { |
8047 case 1: | 7980 case 1: |
8048 if (info[0]->IsArray()) { | 7981 if (info[0]->IsArray()) { |
8049 overloadedMethodD2Method(info); | 7982 overloadedMethodD2Method(info); |
8050 return; | 7983 return; |
8051 } | 7984 } |
8052 if (true) { | 7985 if (true) { |
8053 overloadedMethodD1Method(info); | 7986 overloadedMethodD1Method(info); |
8054 return; | 7987 return; |
8055 } | 7988 } |
8056 break; | 7989 break; |
8057 default: | 7990 default: |
8058 break; | 7991 break; |
8059 } | 7992 } |
8060 if (info.Length() < 1) { | 7993 if (info.Length() < 1) { |
8061 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 7994 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8062 exceptionState.throwIfNeeded(); | |
8063 return; | 7995 return; |
8064 } | 7996 } |
8065 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 7997 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8066 exceptionState.throwIfNeeded(); | |
8067 return; | 7998 return; |
8068 } | 7999 } |
8069 | 8000 |
8070 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8001 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8071 { | 8002 { |
8072 TestObjectV8Internal::overloadedMethodDMethod(info); | 8003 TestObjectV8Internal::overloadedMethodDMethod(info); |
8073 } | 8004 } |
8074 | 8005 |
8075 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8006 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8076 { | 8007 { |
8077 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | 8008 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); |
8078 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8009 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8079 int longArg; | 8010 int longArg; |
8080 { | 8011 { |
8081 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 8012 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8082 if (exceptionState.throwIfNeeded()) | 8013 if (exceptionState.hadException()) |
8083 return; | 8014 return; |
8084 } | 8015 } |
8085 impl->overloadedMethodE(longArg); | 8016 impl->overloadedMethodE(longArg); |
8086 } | 8017 } |
8087 | 8018 |
8088 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8019 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8089 { | 8020 { |
8090 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8021 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8091 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; | 8022 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; |
8092 { | 8023 { |
(...skipping 22 matching lines...) Expand all Loading... |
8115 if (true) { | 8046 if (true) { |
8116 overloadedMethodE1Method(info); | 8047 overloadedMethodE1Method(info); |
8117 return; | 8048 return; |
8118 } | 8049 } |
8119 break; | 8050 break; |
8120 default: | 8051 default: |
8121 break; | 8052 break; |
8122 } | 8053 } |
8123 if (info.Length() < 1) { | 8054 if (info.Length() < 1) { |
8124 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8055 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8125 exceptionState.throwIfNeeded(); | |
8126 return; | 8056 return; |
8127 } | 8057 } |
8128 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8058 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8129 exceptionState.throwIfNeeded(); | |
8130 return; | 8059 return; |
8131 } | 8060 } |
8132 | 8061 |
8133 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8062 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8134 { | 8063 { |
8135 TestObjectV8Internal::overloadedMethodEMethod(info); | 8064 TestObjectV8Internal::overloadedMethodEMethod(info); |
8136 } | 8065 } |
8137 | 8066 |
8138 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8067 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8139 { | 8068 { |
(...skipping 17 matching lines...) Expand all Loading... |
8157 impl->overloadedMethodF(stringArg); | 8086 impl->overloadedMethodF(stringArg); |
8158 } | 8087 } |
8159 | 8088 |
8160 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8089 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8161 { | 8090 { |
8162 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); | 8091 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); |
8163 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8092 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8164 double doubleArg; | 8093 double doubleArg; |
8165 { | 8094 { |
8166 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 8095 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
8167 if (exceptionState.throwIfNeeded()) | 8096 if (exceptionState.hadException()) |
8168 return; | 8097 return; |
8169 } | 8098 } |
8170 impl->overloadedMethodF(doubleArg); | 8099 impl->overloadedMethodF(doubleArg); |
8171 } | 8100 } |
8172 | 8101 |
8173 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8102 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
8174 { | 8103 { |
8175 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); | 8104 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); |
8176 switch (std::min(1, info.Length())) { | 8105 switch (std::min(1, info.Length())) { |
8177 case 0: | 8106 case 0: |
(...skipping 17 matching lines...) Expand all Loading... |
8195 } | 8124 } |
8196 if (true) { | 8125 if (true) { |
8197 overloadedMethodF2Method(info); | 8126 overloadedMethodF2Method(info); |
8198 return; | 8127 return; |
8199 } | 8128 } |
8200 break; | 8129 break; |
8201 default: | 8130 default: |
8202 break; | 8131 break; |
8203 } | 8132 } |
8204 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8133 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8205 exceptionState.throwIfNeeded(); | |
8206 return; | 8134 return; |
8207 } | 8135 } |
8208 | 8136 |
8209 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8137 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8210 { | 8138 { |
8211 TestObjectV8Internal::overloadedMethodFMethod(info); | 8139 TestObjectV8Internal::overloadedMethodFMethod(info); |
8212 } | 8140 } |
8213 | 8141 |
8214 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8142 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8215 { | 8143 { |
8216 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); | 8144 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); |
8217 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8145 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8218 int longArg; | 8146 int longArg; |
8219 { | 8147 { |
8220 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 8148 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8221 if (exceptionState.throwIfNeeded()) | 8149 if (exceptionState.hadException()) |
8222 return; | 8150 return; |
8223 } | 8151 } |
8224 impl->overloadedMethodG(longArg); | 8152 impl->overloadedMethodG(longArg); |
8225 } | 8153 } |
8226 | 8154 |
8227 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8155 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8228 { | 8156 { |
8229 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8157 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8230 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; | 8158 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; |
8231 { | 8159 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8267 } | 8195 } |
8268 if (true) { | 8196 if (true) { |
8269 overloadedMethodG1Method(info); | 8197 overloadedMethodG1Method(info); |
8270 return; | 8198 return; |
8271 } | 8199 } |
8272 break; | 8200 break; |
8273 default: | 8201 default: |
8274 break; | 8202 break; |
8275 } | 8203 } |
8276 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8204 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8277 exceptionState.throwIfNeeded(); | |
8278 return; | 8205 return; |
8279 } | 8206 } |
8280 | 8207 |
8281 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8208 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8282 { | 8209 { |
8283 TestObjectV8Internal::overloadedMethodGMethod(info); | 8210 TestObjectV8Internal::overloadedMethodGMethod(info); |
8284 } | 8211 } |
8285 | 8212 |
8286 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8213 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8287 { | 8214 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8323 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { | 8250 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
8324 overloadedMethodH2Method(info); | 8251 overloadedMethodH2Method(info); |
8325 return; | 8252 return; |
8326 } | 8253 } |
8327 break; | 8254 break; |
8328 default: | 8255 default: |
8329 break; | 8256 break; |
8330 } | 8257 } |
8331 if (info.Length() < 1) { | 8258 if (info.Length() < 1) { |
8332 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8259 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8333 exceptionState.throwIfNeeded(); | |
8334 return; | 8260 return; |
8335 } | 8261 } |
8336 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8262 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8337 exceptionState.throwIfNeeded(); | |
8338 return; | 8263 return; |
8339 } | 8264 } |
8340 | 8265 |
8341 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8266 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8342 { | 8267 { |
8343 TestObjectV8Internal::overloadedMethodHMethod(info); | 8268 TestObjectV8Internal::overloadedMethodHMethod(info); |
8344 } | 8269 } |
8345 | 8270 |
8346 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8271 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8347 { | 8272 { |
8348 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8273 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8349 V8StringResource<> stringArg; | 8274 V8StringResource<> stringArg; |
8350 { | 8275 { |
8351 stringArg = info[0]; | 8276 stringArg = info[0]; |
8352 if (!stringArg.prepare()) | 8277 if (!stringArg.prepare()) |
8353 return; | 8278 return; |
8354 } | 8279 } |
8355 impl->overloadedMethodI(stringArg); | 8280 impl->overloadedMethodI(stringArg); |
8356 } | 8281 } |
8357 | 8282 |
8358 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8283 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8359 { | 8284 { |
8360 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodI", "TestObject", info.Holder(), info.GetIsolate()); | 8285 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodI", "TestObject", info.Holder(), info.GetIsolate()); |
8361 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8286 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8362 double doubleArg; | 8287 double doubleArg; |
8363 { | 8288 { |
8364 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 8289 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
8365 if (exceptionState.throwIfNeeded()) | 8290 if (exceptionState.hadException()) |
8366 return; | 8291 return; |
8367 } | 8292 } |
8368 impl->overloadedMethodI(doubleArg); | 8293 impl->overloadedMethodI(doubleArg); |
8369 } | 8294 } |
8370 | 8295 |
8371 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8296 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
8372 { | 8297 { |
8373 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodI", "TestObject", info.Holder(), info.GetIsolate()); | 8298 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodI", "TestObject", info.Holder(), info.GetIsolate()); |
8374 switch (std::min(1, info.Length())) { | 8299 switch (std::min(1, info.Length())) { |
8375 case 1: | 8300 case 1: |
8376 if (info[0]->IsNumber()) { | 8301 if (info[0]->IsNumber()) { |
8377 overloadedMethodI2Method(info); | 8302 overloadedMethodI2Method(info); |
8378 return; | 8303 return; |
8379 } | 8304 } |
8380 if (true) { | 8305 if (true) { |
8381 overloadedMethodI1Method(info); | 8306 overloadedMethodI1Method(info); |
8382 return; | 8307 return; |
8383 } | 8308 } |
8384 if (true) { | 8309 if (true) { |
8385 overloadedMethodI2Method(info); | 8310 overloadedMethodI2Method(info); |
8386 return; | 8311 return; |
8387 } | 8312 } |
8388 break; | 8313 break; |
8389 default: | 8314 default: |
8390 break; | 8315 break; |
8391 } | 8316 } |
8392 if (info.Length() < 1) { | 8317 if (info.Length() < 1) { |
8393 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8318 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8394 exceptionState.throwIfNeeded(); | |
8395 return; | 8319 return; |
8396 } | 8320 } |
8397 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8321 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8398 exceptionState.throwIfNeeded(); | |
8399 return; | 8322 return; |
8400 } | 8323 } |
8401 | 8324 |
8402 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8325 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8403 { | 8326 { |
8404 TestObjectV8Internal::overloadedMethodIMethod(info); | 8327 TestObjectV8Internal::overloadedMethodIMethod(info); |
8405 } | 8328 } |
8406 | 8329 |
8407 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8330 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8408 { | 8331 { |
8409 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8332 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8410 V8StringResource<> stringArg; | 8333 V8StringResource<> stringArg; |
8411 { | 8334 { |
8412 stringArg = info[0]; | 8335 stringArg = info[0]; |
8413 if (!stringArg.prepare()) | 8336 if (!stringArg.prepare()) |
8414 return; | 8337 return; |
8415 } | 8338 } |
8416 impl->overloadedMethodJ(stringArg); | 8339 impl->overloadedMethodJ(stringArg); |
8417 } | 8340 } |
8418 | 8341 |
8419 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8342 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8420 { | 8343 { |
8421 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); | 8344 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); |
8422 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8345 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8423 TestDictionary testDictionaryArg; | 8346 TestDictionary testDictionaryArg; |
8424 { | 8347 { |
8425 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 8348 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
8426 exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is
not an object."); | 8349 exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is
not an object."); |
8427 exceptionState.throwIfNeeded(); | |
8428 return; | 8350 return; |
8429 } | 8351 } |
8430 V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg,
exceptionState); | 8352 V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg,
exceptionState); |
8431 if (exceptionState.throwIfNeeded()) | 8353 if (exceptionState.hadException()) |
8432 return; | 8354 return; |
8433 } | 8355 } |
8434 impl->overloadedMethodJ(testDictionaryArg); | 8356 impl->overloadedMethodJ(testDictionaryArg); |
8435 } | 8357 } |
8436 | 8358 |
8437 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8359 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
8438 { | 8360 { |
8439 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); | 8361 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); |
8440 switch (std::min(1, info.Length())) { | 8362 switch (std::min(1, info.Length())) { |
8441 case 1: | 8363 case 1: |
8442 if (info[0]->IsObject()) { | 8364 if (info[0]->IsObject()) { |
8443 overloadedMethodJ2Method(info); | 8365 overloadedMethodJ2Method(info); |
8444 return; | 8366 return; |
8445 } | 8367 } |
8446 if (true) { | 8368 if (true) { |
8447 overloadedMethodJ1Method(info); | 8369 overloadedMethodJ1Method(info); |
8448 return; | 8370 return; |
8449 } | 8371 } |
8450 break; | 8372 break; |
8451 default: | 8373 default: |
8452 break; | 8374 break; |
8453 } | 8375 } |
8454 if (info.Length() < 1) { | 8376 if (info.Length() < 1) { |
8455 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8377 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8456 exceptionState.throwIfNeeded(); | |
8457 return; | 8378 return; |
8458 } | 8379 } |
8459 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8380 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8460 exceptionState.throwIfNeeded(); | |
8461 return; | 8381 return; |
8462 } | 8382 } |
8463 | 8383 |
8464 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8384 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8465 { | 8385 { |
8466 TestObjectV8Internal::overloadedMethodJMethod(info); | 8386 TestObjectV8Internal::overloadedMethodJMethod(info); |
8467 } | 8387 } |
8468 | 8388 |
8469 static void overloadedMethodK1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8389 static void overloadedMethodK1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8470 { | 8390 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8504 if (true) { | 8424 if (true) { |
8505 overloadedMethodK2Method(info); | 8425 overloadedMethodK2Method(info); |
8506 return; | 8426 return; |
8507 } | 8427 } |
8508 break; | 8428 break; |
8509 default: | 8429 default: |
8510 break; | 8430 break; |
8511 } | 8431 } |
8512 if (info.Length() < 1) { | 8432 if (info.Length() < 1) { |
8513 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8433 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8514 exceptionState.throwIfNeeded(); | |
8515 return; | 8434 return; |
8516 } | 8435 } |
8517 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8436 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8518 exceptionState.throwIfNeeded(); | |
8519 return; | 8437 return; |
8520 } | 8438 } |
8521 | 8439 |
8522 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8440 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8523 { | 8441 { |
8524 TestObjectV8Internal::overloadedMethodKMethod(info); | 8442 TestObjectV8Internal::overloadedMethodKMethod(info); |
8525 } | 8443 } |
8526 | 8444 |
8527 static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8445 static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8528 { | 8446 { |
8529 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); | 8447 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); |
8530 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8448 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8531 int longArg; | 8449 int longArg; |
8532 Vector<ScriptValue> restArgs; | 8450 Vector<ScriptValue> restArgs; |
8533 { | 8451 { |
8534 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 8452 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8535 if (exceptionState.throwIfNeeded()) | 8453 if (exceptionState.hadException()) |
8536 return; | 8454 return; |
8537 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState)
; | 8455 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState)
; |
8538 if (exceptionState.throwIfNeeded()) | 8456 if (exceptionState.hadException()) |
8539 return; | 8457 return; |
8540 } | 8458 } |
8541 impl->overloadedMethodL(longArg, restArgs); | 8459 impl->overloadedMethodL(longArg, restArgs); |
8542 } | 8460 } |
8543 | 8461 |
8544 static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8462 static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8545 { | 8463 { |
8546 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); | 8464 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); |
8547 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8465 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8548 V8StringResource<> stringArg; | 8466 V8StringResource<> stringArg; |
8549 Vector<ScriptValue> restArgs; | 8467 Vector<ScriptValue> restArgs; |
8550 { | 8468 { |
8551 stringArg = info[0]; | 8469 stringArg = info[0]; |
8552 if (!stringArg.prepare()) | 8470 if (!stringArg.prepare()) |
8553 return; | 8471 return; |
8554 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState)
; | 8472 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState)
; |
8555 if (exceptionState.throwIfNeeded()) | 8473 if (exceptionState.hadException()) |
8556 return; | 8474 return; |
8557 } | 8475 } |
8558 impl->overloadedMethodL(stringArg, restArgs); | 8476 impl->overloadedMethodL(stringArg, restArgs); |
8559 } | 8477 } |
8560 | 8478 |
8561 static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8479 static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
8562 { | 8480 { |
8563 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); | 8481 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); |
8564 switch (std::min(2, info.Length())) { | 8482 switch (std::min(2, info.Length())) { |
8565 case 1: | 8483 case 1: |
(...skipping 22 matching lines...) Expand all Loading... |
8588 if (true) { | 8506 if (true) { |
8589 overloadedMethodL1Method(info); | 8507 overloadedMethodL1Method(info); |
8590 return; | 8508 return; |
8591 } | 8509 } |
8592 break; | 8510 break; |
8593 default: | 8511 default: |
8594 break; | 8512 break; |
8595 } | 8513 } |
8596 if (info.Length() < 1) { | 8514 if (info.Length() < 1) { |
8597 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8515 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8598 exceptionState.throwIfNeeded(); | |
8599 return; | 8516 return; |
8600 } | 8517 } |
8601 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8518 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8602 exceptionState.throwIfNeeded(); | |
8603 return; | 8519 return; |
8604 } | 8520 } |
8605 | 8521 |
8606 static void overloadedMethodLMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8522 static void overloadedMethodLMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8607 { | 8523 { |
8608 TestObjectV8Internal::overloadedMethodLMethod(info); | 8524 TestObjectV8Internal::overloadedMethodLMethod(info); |
8609 } | 8525 } |
8610 | 8526 |
8611 static void overloadedMethodN1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8527 static void overloadedMethodN1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8612 { | 8528 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8648 if (info[0]->IsObject()) { | 8564 if (info[0]->IsObject()) { |
8649 overloadedMethodN2Method(info); | 8565 overloadedMethodN2Method(info); |
8650 return; | 8566 return; |
8651 } | 8567 } |
8652 break; | 8568 break; |
8653 default: | 8569 default: |
8654 break; | 8570 break; |
8655 } | 8571 } |
8656 if (info.Length() < 1) { | 8572 if (info.Length() < 1) { |
8657 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8573 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8658 exceptionState.throwIfNeeded(); | |
8659 return; | 8574 return; |
8660 } | 8575 } |
8661 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8576 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8662 exceptionState.throwIfNeeded(); | |
8663 return; | 8577 return; |
8664 } | 8578 } |
8665 | 8579 |
8666 static void overloadedMethodNMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8580 static void overloadedMethodNMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8667 { | 8581 { |
8668 TestObjectV8Internal::overloadedMethodNMethod(info); | 8582 TestObjectV8Internal::overloadedMethodNMethod(info); |
8669 } | 8583 } |
8670 | 8584 |
8671 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8585 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8672 { | 8586 { |
8673 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8587 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8674 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); | 8588 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); |
8675 } | 8589 } |
8676 | 8590 |
8677 static void promiseOverloadMethod2MethodPromise(const v8::FunctionCallbackInfo<v
8::Value>& info, ExceptionState& exceptionState) | 8591 static void promiseOverloadMethod2MethodPromise(const v8::FunctionCallbackInfo<v
8::Value>& info, ExceptionState& exceptionState) |
8678 { | 8592 { |
8679 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8593 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8680 DOMWindow* arg1; | 8594 DOMWindow* arg1; |
8681 double arg2; | 8595 double arg2; |
8682 { | 8596 { |
8683 arg1 = toDOMWindow(info.GetIsolate(), info[0]); | 8597 arg1 = toDOMWindow(info.GetIsolate(), info[0]); |
8684 if (!arg1) { | 8598 if (!arg1) { |
8685 exceptionState.throwTypeError("parameter 1 is not of type 'Window'."
); | 8599 exceptionState.throwTypeError("parameter 1 is not of type 'Window'."
); |
| 8600 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); |
8686 return; | 8601 return; |
8687 } | 8602 } |
8688 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); | 8603 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); |
8689 if (exceptionState.hadException()) | 8604 if (exceptionState.hadException()) |
8690 return; | 8605 return; |
8691 } | 8606 } |
8692 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); | 8607 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); |
8693 } | 8608 } |
8694 | 8609 |
8695 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8610 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8696 { | 8611 { |
8697 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver
loadMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8612 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver
loadMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8698 promiseOverloadMethod2MethodPromise(info, exceptionState); | 8613 promiseOverloadMethod2MethodPromise(info, exceptionState); |
8699 if (exceptionState.hadException()) | 8614 if (exceptionState.hadException()) |
8700 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); | 8615 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); |
8701 } | 8616 } |
8702 | 8617 |
8703 static void promiseOverloadMethod3MethodPromise(const v8::FunctionCallbackInfo<v
8::Value>& info, ExceptionState& exceptionState) | 8618 static void promiseOverloadMethod3MethodPromise(const v8::FunctionCallbackInfo<v
8::Value>& info, ExceptionState& exceptionState) |
8704 { | 8619 { |
8705 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8620 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8706 Document* arg1; | 8621 Document* arg1; |
8707 double arg2; | 8622 double arg2; |
8708 { | 8623 { |
8709 arg1 = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 8624 arg1 = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
8710 if (!arg1) { | 8625 if (!arg1) { |
8711 exceptionState.throwTypeError("parameter 1 is not of type 'Document'
."); | 8626 exceptionState.throwTypeError("parameter 1 is not of type 'Document'
."); |
| 8627 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); |
8712 return; | 8628 return; |
8713 } | 8629 } |
8714 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); | 8630 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); |
8715 if (exceptionState.hadException()) | 8631 if (exceptionState.hadException()) |
8716 return; | 8632 return; |
8717 } | 8633 } |
8718 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); | 8634 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); |
8719 } | 8635 } |
8720 | 8636 |
8721 static void promiseOverloadMethod3Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8637 static void promiseOverloadMethod3Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8776 impl->overloadedPerWorldBindingsMethod(); | 8692 impl->overloadedPerWorldBindingsMethod(); |
8777 } | 8693 } |
8778 | 8694 |
8779 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 8695 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
8780 { | 8696 { |
8781 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8697 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8782 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8698 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8783 int longArg; | 8699 int longArg; |
8784 { | 8700 { |
8785 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 8701 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8786 if (exceptionState.throwIfNeeded()) | 8702 if (exceptionState.hadException()) |
8787 return; | 8703 return; |
8788 } | 8704 } |
8789 impl->overloadedPerWorldBindingsMethod(longArg); | 8705 impl->overloadedPerWorldBindingsMethod(longArg); |
8790 } | 8706 } |
8791 | 8707 |
8792 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 8708 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
8793 { | 8709 { |
8794 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8710 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8795 switch (std::min(1, info.Length())) { | 8711 switch (std::min(1, info.Length())) { |
8796 case 0: | 8712 case 0: |
8797 if (true) { | 8713 if (true) { |
8798 overloadedPerWorldBindingsMethod1Method(info); | 8714 overloadedPerWorldBindingsMethod1Method(info); |
8799 return; | 8715 return; |
8800 } | 8716 } |
8801 break; | 8717 break; |
8802 case 1: | 8718 case 1: |
8803 if (true) { | 8719 if (true) { |
8804 overloadedPerWorldBindingsMethod2Method(info); | 8720 overloadedPerWorldBindingsMethod2Method(info); |
8805 return; | 8721 return; |
8806 } | 8722 } |
8807 break; | 8723 break; |
8808 default: | 8724 default: |
8809 break; | 8725 break; |
8810 } | 8726 } |
8811 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8727 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8812 exceptionState.throwIfNeeded(); | |
8813 return; | 8728 return; |
8814 } | 8729 } |
8815 | 8730 |
8816 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 8731 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
8817 { | 8732 { |
8818 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); | 8733 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); |
8819 } | 8734 } |
8820 | 8735 |
8821 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | 8736 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) |
8822 { | 8737 { |
8823 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8738 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8824 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8739 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8825 int longArg; | 8740 int longArg; |
8826 { | 8741 { |
8827 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 8742 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8828 if (exceptionState.throwIfNeeded()) | 8743 if (exceptionState.hadException()) |
8829 return; | 8744 return; |
8830 } | 8745 } |
8831 impl->overloadedPerWorldBindingsMethod(longArg); | 8746 impl->overloadedPerWorldBindingsMethod(longArg); |
8832 } | 8747 } |
8833 | 8748 |
8834 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) | 8749 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) |
8835 { | 8750 { |
8836 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8751 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8837 switch (std::min(1, info.Length())) { | 8752 switch (std::min(1, info.Length())) { |
8838 case 0: | 8753 case 0: |
8839 if (true) { | 8754 if (true) { |
8840 overloadedPerWorldBindingsMethod1MethodForMainWorld(info); | 8755 overloadedPerWorldBindingsMethod1MethodForMainWorld(info); |
8841 return; | 8756 return; |
8842 } | 8757 } |
8843 break; | 8758 break; |
8844 case 1: | 8759 case 1: |
8845 if (true) { | 8760 if (true) { |
8846 overloadedPerWorldBindingsMethod2MethodForMainWorld(info); | 8761 overloadedPerWorldBindingsMethod2MethodForMainWorld(info); |
8847 return; | 8762 return; |
8848 } | 8763 } |
8849 break; | 8764 break; |
8850 default: | 8765 default: |
8851 break; | 8766 break; |
8852 } | 8767 } |
8853 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8768 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8854 exceptionState.throwIfNeeded(); | |
8855 return; | 8769 return; |
8856 } | 8770 } |
8857 | 8771 |
8858 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 8772 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
8859 { | 8773 { |
8860 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(inf
o); | 8774 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(inf
o); |
8861 } | 8775 } |
8862 | 8776 |
8863 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 8777 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
8864 { | 8778 { |
8865 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8779 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8866 int longArg; | 8780 int longArg; |
8867 { | 8781 { |
8868 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 8782 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
8869 if (exceptionState.throwIfNeeded()) | 8783 if (exceptionState.hadException()) |
8870 return; | 8784 return; |
8871 } | 8785 } |
8872 TestObject::overloadedStaticMethod(longArg); | 8786 TestObject::overloadedStaticMethod(longArg); |
8873 } | 8787 } |
8874 | 8788 |
8875 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 8789 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
8876 { | 8790 { |
8877 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8791 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8878 int longArg1; | 8792 int longArg1; |
8879 int longArg2; | 8793 int longArg2; |
8880 { | 8794 { |
8881 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, excepti
onState); | 8795 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, excepti
onState); |
8882 if (exceptionState.throwIfNeeded()) | 8796 if (exceptionState.hadException()) |
8883 return; | 8797 return; |
8884 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, excepti
onState); | 8798 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, excepti
onState); |
8885 if (exceptionState.throwIfNeeded()) | 8799 if (exceptionState.hadException()) |
8886 return; | 8800 return; |
8887 } | 8801 } |
8888 TestObject::overloadedStaticMethod(longArg1, longArg2); | 8802 TestObject::overloadedStaticMethod(longArg1, longArg2); |
8889 } | 8803 } |
8890 | 8804 |
8891 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8805 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8892 { | 8806 { |
8893 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8807 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8894 switch (std::min(2, info.Length())) { | 8808 switch (std::min(2, info.Length())) { |
8895 case 1: | 8809 case 1: |
8896 if (true) { | 8810 if (true) { |
8897 overloadedStaticMethod1Method(info); | 8811 overloadedStaticMethod1Method(info); |
8898 return; | 8812 return; |
8899 } | 8813 } |
8900 break; | 8814 break; |
8901 case 2: | 8815 case 2: |
8902 if (true) { | 8816 if (true) { |
8903 overloadedStaticMethod2Method(info); | 8817 overloadedStaticMethod2Method(info); |
8904 return; | 8818 return; |
8905 } | 8819 } |
8906 break; | 8820 break; |
8907 default: | 8821 default: |
8908 break; | 8822 break; |
8909 } | 8823 } |
8910 if (info.Length() < 1) { | 8824 if (info.Length() < 1) { |
8911 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 8825 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
8912 exceptionState.throwIfNeeded(); | |
8913 return; | 8826 return; |
8914 } | 8827 } |
8915 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 8828 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
8916 exceptionState.throwIfNeeded(); | |
8917 return; | 8829 return; |
8918 } | 8830 } |
8919 | 8831 |
8920 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 8832 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
8921 { | 8833 { |
8922 TestObjectV8Internal::overloadedStaticMethodMethod(info); | 8834 TestObjectV8Internal::overloadedStaticMethodMethod(info); |
8923 } | 8835 } |
8924 | 8836 |
8925 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 8837 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
8926 { | 8838 { |
8927 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tObject", info.Holder(), info.GetIsolate()); | 8839 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tObject", info.Holder(), info.GetIsolate()); |
8928 if (UNLIKELY(info.Length() < 1)) { | 8840 if (UNLIKELY(info.Length() < 1)) { |
8929 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8841 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
8930 exceptionState.throwIfNeeded(); | |
8931 return; | 8842 return; |
8932 } | 8843 } |
8933 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8844 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8934 unsigned index; | 8845 unsigned index; |
8935 { | 8846 { |
8936 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exception
State); | 8847 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exception
State); |
8937 if (exceptionState.throwIfNeeded()) | 8848 if (exceptionState.hadException()) |
8938 return; | 8849 return; |
8939 } | 8850 } |
8940 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 8851 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
8941 ScriptValue result = impl->item(scriptState, index); | 8852 ScriptValue result = impl->item(scriptState, index); |
8942 v8SetReturnValue(info, result.v8Value()); | 8853 v8SetReturnValue(info, result.v8Value()); |
8943 } | 8854 } |
8944 | 8855 |
8945 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 8856 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
8946 { | 8857 { |
8947 TestObjectV8Internal::itemMethod(info); | 8858 TestObjectV8Internal::itemMethod(info); |
8948 } | 8859 } |
8949 | 8860 |
8950 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 8861 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
8951 { | 8862 { |
8952 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestObject", info.Holder(), info.GetIsolate()); | 8863 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestObject", info.Holder(), info.GetIsolate()); |
8953 if (UNLIKELY(info.Length() < 2)) { | 8864 if (UNLIKELY(info.Length() < 2)) { |
8954 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 8865 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
8955 exceptionState.throwIfNeeded(); | |
8956 return; | 8866 return; |
8957 } | 8867 } |
8958 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8868 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8959 unsigned index; | 8869 unsigned index; |
8960 V8StringResource<> value; | 8870 V8StringResource<> value; |
8961 { | 8871 { |
8962 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exception
State); | 8872 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exception
State); |
8963 if (exceptionState.throwIfNeeded()) | 8873 if (exceptionState.hadException()) |
8964 return; | 8874 return; |
8965 value = info[1]; | 8875 value = info[1]; |
8966 if (!value.prepare()) | 8876 if (!value.prepare()) |
8967 return; | 8877 return; |
8968 } | 8878 } |
8969 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 8879 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
8970 String result = impl->setItem(scriptState, index, value); | 8880 String result = impl->setItem(scriptState, index, value); |
8971 v8SetReturnValueString(info, result, info.GetIsolate()); | 8881 v8SetReturnValueString(info, result, info.GetIsolate()); |
8972 } | 8882 } |
8973 | 8883 |
8974 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 8884 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
8975 { | 8885 { |
8976 TestObjectV8Internal::setItemMethod(info); | 8886 TestObjectV8Internal::setItemMethod(info); |
8977 } | 8887 } |
8978 | 8888 |
8979 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 8889 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
8980 { | 8890 { |
8981 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | 8891 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
8982 if (UNLIKELY(info.Length() < 1)) { | 8892 if (UNLIKELY(info.Length() < 1)) { |
8983 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8893 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
8984 exceptionState.throwIfNeeded(); | |
8985 return; | 8894 return; |
8986 } | 8895 } |
8987 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8896 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8988 unsigned clampUnsignedShortArg; | 8897 unsigned clampUnsignedShortArg; |
8989 { | 8898 { |
8990 clampUnsignedShortArg = toUInt16(info.GetIsolate(), info[0], Clamp, exce
ptionState); | 8899 clampUnsignedShortArg = toUInt16(info.GetIsolate(), info[0], Clamp, exce
ptionState); |
8991 if (exceptionState.throwIfNeeded()) | 8900 if (exceptionState.hadException()) |
8992 return; | 8901 return; |
8993 } | 8902 } |
8994 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); | 8903 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); |
8995 } | 8904 } |
8996 | 8905 |
8997 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 8906 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
8998 { | 8907 { |
8999 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); | 8908 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); |
9000 } | 8909 } |
9001 | 8910 |
9002 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 8911 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
9003 { | 8912 { |
9004 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8913 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
9005 if (UNLIKELY(info.Length() < 1)) { | 8914 if (UNLIKELY(info.Length() < 1)) { |
9006 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8915 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
9007 exceptionState.throwIfNeeded(); | |
9008 return; | 8916 return; |
9009 } | 8917 } |
9010 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8918 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9011 unsigned clampUnsignedLongArg; | 8919 unsigned clampUnsignedLongArg; |
9012 { | 8920 { |
9013 clampUnsignedLongArg = toUInt32(info.GetIsolate(), info[0], Clamp, excep
tionState); | 8921 clampUnsignedLongArg = toUInt32(info.GetIsolate(), info[0], Clamp, excep
tionState); |
9014 if (exceptionState.throwIfNeeded()) | 8922 if (exceptionState.hadException()) |
9015 return; | 8923 return; |
9016 } | 8924 } |
9017 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); | 8925 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); |
9018 } | 8926 } |
9019 | 8927 |
9020 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 8928 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
9021 { | 8929 { |
9022 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); | 8930 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); |
9023 } | 8931 } |
9024 | 8932 |
(...skipping 16 matching lines...) Expand all Loading... |
9041 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); | 8949 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); |
9042 } | 8950 } |
9043 | 8951 |
9044 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 8952 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
9045 { | 8953 { |
9046 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8954 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
9047 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8955 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9048 int defaultUndefinedLongArg; | 8956 int defaultUndefinedLongArg; |
9049 { | 8957 { |
9050 defaultUndefinedLongArg = toInt32(info.GetIsolate(), info[0], NormalConv
ersion, exceptionState); | 8958 defaultUndefinedLongArg = toInt32(info.GetIsolate(), info[0], NormalConv
ersion, exceptionState); |
9051 if (exceptionState.throwIfNeeded()) | 8959 if (exceptionState.hadException()) |
9052 return; | 8960 return; |
9053 } | 8961 } |
9054 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); | 8962 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); |
9055 } | 8963 } |
9056 | 8964 |
9057 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 8965 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
9058 { | 8966 { |
9059 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); | 8967 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); |
9060 } | 8968 } |
9061 | 8969 |
(...skipping 12 matching lines...) Expand all Loading... |
9074 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 8982 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
9075 { | 8983 { |
9076 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); | 8984 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); |
9077 } | 8985 } |
9078 | 8986 |
9079 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 8987 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
9080 { | 8988 { |
9081 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8989 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
9082 if (UNLIKELY(info.Length() < 1)) { | 8990 if (UNLIKELY(info.Length() < 1)) { |
9083 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8991 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
9084 exceptionState.throwIfNeeded(); | |
9085 return; | 8992 return; |
9086 } | 8993 } |
9087 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8994 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9088 int enforceRangeLongArg; | 8995 int enforceRangeLongArg; |
9089 { | 8996 { |
9090 enforceRangeLongArg = toInt32(info.GetIsolate(), info[0], EnforceRange,
exceptionState); | 8997 enforceRangeLongArg = toInt32(info.GetIsolate(), info[0], EnforceRange,
exceptionState); |
9091 if (exceptionState.throwIfNeeded()) | 8998 if (exceptionState.hadException()) |
9092 return; | 8999 return; |
9093 } | 9000 } |
9094 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); | 9001 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); |
9095 } | 9002 } |
9096 | 9003 |
9097 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 9004 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
9098 { | 9005 { |
9099 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); | 9006 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); |
9100 } | 9007 } |
9101 | 9008 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9255 break; | 9162 break; |
9256 --numArgsPassed; | 9163 --numArgsPassed; |
9257 } | 9164 } |
9258 if (UNLIKELY(numArgsPassed <= 0)) { | 9165 if (UNLIKELY(numArgsPassed <= 0)) { |
9259 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 9166 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
9260 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState
, info, 1)); | 9167 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState
, info, 1)); |
9261 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments); | 9168 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments); |
9262 return; | 9169 return; |
9263 } | 9170 } |
9264 optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionStat
e); | 9171 optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionStat
e); |
9265 if (exceptionState.throwIfNeeded()) | 9172 if (exceptionState.hadException()) |
9266 return; | 9173 return; |
9267 } | 9174 } |
9268 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 9175 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
9269 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info,
1)); | 9176 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info,
1)); |
9270 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments, optionalBooleanArg); | 9177 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments, optionalBooleanArg); |
9271 } | 9178 } |
9272 | 9179 |
9273 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) | 9180 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) |
9274 { | 9181 { |
9275 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); | 9182 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9307 static void callWithThisValueMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 9214 static void callWithThisValueMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
9308 { | 9215 { |
9309 TestObjectV8Internal::callWithThisValueMethod(info); | 9216 TestObjectV8Internal::callWithThisValueMethod(info); |
9310 } | 9217 } |
9311 | 9218 |
9312 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 9219 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
9313 { | 9220 { |
9314 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9221 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9315 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()
), impl->checkSecurityForNodeVoidMethod(), exceptionState)) { | 9222 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()
), impl->checkSecurityForNodeVoidMethod(), exceptionState)) { |
9316 v8SetReturnValueNull(info); | 9223 v8SetReturnValueNull(info); |
9317 exceptionState.throwIfNeeded(); | |
9318 return; | 9224 return; |
9319 } | 9225 } |
9320 impl->checkSecurityForNodeVoidMethod(); | 9226 impl->checkSecurityForNodeVoidMethod(); |
9321 } | 9227 } |
9322 | 9228 |
9323 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 9229 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
9324 { | 9230 { |
9325 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); | 9231 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); |
9326 } | 9232 } |
9327 | 9233 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9419 impl->measureOverloadedMethod(); | 9325 impl->measureOverloadedMethod(); |
9420 } | 9326 } |
9421 | 9327 |
9422 static void measureOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 9328 static void measureOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
9423 { | 9329 { |
9424 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOver
loadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9330 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOver
loadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9425 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9331 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9426 int arg; | 9332 int arg; |
9427 { | 9333 { |
9428 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9334 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9429 if (exceptionState.throwIfNeeded()) | 9335 if (exceptionState.hadException()) |
9430 return; | 9336 return; |
9431 } | 9337 } |
9432 impl->measureOverloadedMethod(arg); | 9338 impl->measureOverloadedMethod(arg); |
9433 } | 9339 } |
9434 | 9340 |
9435 static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 9341 static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
9436 { | 9342 { |
9437 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOver
loadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9343 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOver
loadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9438 switch (std::min(1, info.Length())) { | 9344 switch (std::min(1, info.Length())) { |
9439 case 0: | 9345 case 0: |
9440 if (true) { | 9346 if (true) { |
9441 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_
Method); | 9347 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_
Method); |
9442 measureOverloadedMethod1Method(info); | 9348 measureOverloadedMethod1Method(info); |
9443 return; | 9349 return; |
9444 } | 9350 } |
9445 break; | 9351 break; |
9446 case 1: | 9352 case 1: |
9447 if (true) { | 9353 if (true) { |
9448 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_
Method); | 9354 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_
Method); |
9449 measureOverloadedMethod2Method(info); | 9355 measureOverloadedMethod2Method(info); |
9450 return; | 9356 return; |
9451 } | 9357 } |
9452 break; | 9358 break; |
9453 default: | 9359 default: |
9454 break; | 9360 break; |
9455 } | 9361 } |
9456 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9362 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9457 exceptionState.throwIfNeeded(); | |
9458 return; | 9363 return; |
9459 } | 9364 } |
9460 | 9365 |
9461 static void measureOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 9366 static void measureOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
9462 { | 9367 { |
9463 TestObjectV8Internal::measureOverloadedMethodMethod(info); | 9368 TestObjectV8Internal::measureOverloadedMethodMethod(info); |
9464 } | 9369 } |
9465 | 9370 |
9466 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 9371 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
9467 { | 9372 { |
9468 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9373 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9469 impl->DeprecateAsOverloadedMethod(); | 9374 impl->DeprecateAsOverloadedMethod(); |
9470 } | 9375 } |
9471 | 9376 |
9472 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 9377 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
9473 { | 9378 { |
9474 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9379 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9475 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9380 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9476 int arg; | 9381 int arg; |
9477 { | 9382 { |
9478 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9383 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9479 if (exceptionState.throwIfNeeded()) | 9384 if (exceptionState.hadException()) |
9480 return; | 9385 return; |
9481 } | 9386 } |
9482 impl->DeprecateAsOverloadedMethod(arg); | 9387 impl->DeprecateAsOverloadedMethod(arg); |
9483 } | 9388 } |
9484 | 9389 |
9485 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 9390 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
9486 { | 9391 { |
9487 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9392 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9488 switch (std::min(1, info.Length())) { | 9393 switch (std::min(1, info.Length())) { |
9489 case 0: | 9394 case 0: |
9490 if (true) { | 9395 if (true) { |
9491 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); | 9396 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
9492 DeprecateAsOverloadedMethod1Method(info); | 9397 DeprecateAsOverloadedMethod1Method(info); |
9493 return; | 9398 return; |
9494 } | 9399 } |
9495 break; | 9400 break; |
9496 case 1: | 9401 case 1: |
9497 if (true) { | 9402 if (true) { |
9498 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); | 9403 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
9499 DeprecateAsOverloadedMethod2Method(info); | 9404 DeprecateAsOverloadedMethod2Method(info); |
9500 return; | 9405 return; |
9501 } | 9406 } |
9502 break; | 9407 break; |
9503 default: | 9408 default: |
9504 break; | 9409 break; |
9505 } | 9410 } |
9506 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9411 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9507 exceptionState.throwIfNeeded(); | |
9508 return; | 9412 return; |
9509 } | 9413 } |
9510 | 9414 |
9511 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 9415 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
9512 { | 9416 { |
9513 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); | 9417 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); |
9514 } | 9418 } |
9515 | 9419 |
9516 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 9420 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
9517 { | 9421 { |
9518 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9422 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9519 impl->DeprecateAsSameValueOverloadedMethod(); | 9423 impl->DeprecateAsSameValueOverloadedMethod(); |
9520 } | 9424 } |
9521 | 9425 |
9522 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 9426 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
9523 { | 9427 { |
9524 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9428 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9525 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9429 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9526 int arg; | 9430 int arg; |
9527 { | 9431 { |
9528 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9432 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9529 if (exceptionState.throwIfNeeded()) | 9433 if (exceptionState.hadException()) |
9530 return; | 9434 return; |
9531 } | 9435 } |
9532 impl->DeprecateAsSameValueOverloadedMethod(arg); | 9436 impl->DeprecateAsSameValueOverloadedMethod(arg); |
9533 } | 9437 } |
9534 | 9438 |
9535 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 9439 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
9536 { | 9440 { |
9537 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9441 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9538 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::TestFeature); | 9442 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
9539 switch (std::min(1, info.Length())) { | 9443 switch (std::min(1, info.Length())) { |
9540 case 0: | 9444 case 0: |
9541 if (true) { | 9445 if (true) { |
9542 DeprecateAsSameValueOverloadedMethod1Method(info); | 9446 DeprecateAsSameValueOverloadedMethod1Method(info); |
9543 return; | 9447 return; |
9544 } | 9448 } |
9545 break; | 9449 break; |
9546 case 1: | 9450 case 1: |
9547 if (true) { | 9451 if (true) { |
9548 DeprecateAsSameValueOverloadedMethod2Method(info); | 9452 DeprecateAsSameValueOverloadedMethod2Method(info); |
9549 return; | 9453 return; |
9550 } | 9454 } |
9551 break; | 9455 break; |
9552 default: | 9456 default: |
9553 break; | 9457 break; |
9554 } | 9458 } |
9555 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9459 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9556 exceptionState.throwIfNeeded(); | |
9557 return; | 9460 return; |
9558 } | 9461 } |
9559 | 9462 |
9560 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9463 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
9561 { | 9464 { |
9562 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); | 9465 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); |
9563 } | 9466 } |
9564 | 9467 |
9565 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 9468 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
9566 { | 9469 { |
9567 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9470 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9568 impl->measureAsOverloadedMethod(); | 9471 impl->measureAsOverloadedMethod(); |
9569 } | 9472 } |
9570 | 9473 |
9571 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 9474 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
9572 { | 9475 { |
9573 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9476 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9574 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9477 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9575 int arg; | 9478 int arg; |
9576 { | 9479 { |
9577 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9480 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9578 if (exceptionState.throwIfNeeded()) | 9481 if (exceptionState.hadException()) |
9579 return; | 9482 return; |
9580 } | 9483 } |
9581 impl->measureAsOverloadedMethod(arg); | 9484 impl->measureAsOverloadedMethod(arg); |
9582 } | 9485 } |
9583 | 9486 |
9584 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 9487 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
9585 { | 9488 { |
9586 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9489 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9587 switch (std::min(1, info.Length())) { | 9490 switch (std::min(1, info.Length())) { |
9588 case 0: | 9491 case 0: |
9589 if (true) { | 9492 if (true) { |
9590 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureA); | 9493 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
9591 measureAsOverloadedMethod1Method(info); | 9494 measureAsOverloadedMethod1Method(info); |
9592 return; | 9495 return; |
9593 } | 9496 } |
9594 break; | 9497 break; |
9595 case 1: | 9498 case 1: |
9596 if (true) { | 9499 if (true) { |
9597 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); | 9500 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
9598 measureAsOverloadedMethod2Method(info); | 9501 measureAsOverloadedMethod2Method(info); |
9599 return; | 9502 return; |
9600 } | 9503 } |
9601 break; | 9504 break; |
9602 default: | 9505 default: |
9603 break; | 9506 break; |
9604 } | 9507 } |
9605 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9508 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9606 exceptionState.throwIfNeeded(); | |
9607 return; | 9509 return; |
9608 } | 9510 } |
9609 | 9511 |
9610 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 9512 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
9611 { | 9513 { |
9612 TestObjectV8Internal::measureAsOverloadedMethodMethod(info); | 9514 TestObjectV8Internal::measureAsOverloadedMethodMethod(info); |
9613 } | 9515 } |
9614 | 9516 |
9615 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) | 9517 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) |
9616 { | 9518 { |
9617 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9519 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9618 impl->measureAsSameValueOverloadedMethod(); | 9520 impl->measureAsSameValueOverloadedMethod(); |
9619 } | 9521 } |
9620 | 9522 |
9621 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 9523 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
9622 { | 9524 { |
9623 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9525 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9624 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9526 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9625 int arg; | 9527 int arg; |
9626 { | 9528 { |
9627 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9529 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9628 if (exceptionState.throwIfNeeded()) | 9530 if (exceptionState.hadException()) |
9629 return; | 9531 return; |
9630 } | 9532 } |
9631 impl->measureAsSameValueOverloadedMethod(arg); | 9533 impl->measureAsSameValueOverloadedMethod(arg); |
9632 } | 9534 } |
9633 | 9535 |
9634 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 9536 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
9635 { | 9537 { |
9636 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9538 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
9637 switch (std::min(1, info.Length())) { | 9539 switch (std::min(1, info.Length())) { |
9638 case 0: | 9540 case 0: |
9639 if (true) { | 9541 if (true) { |
9640 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); | 9542 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); |
9641 measureAsSameValueOverloadedMethod1Method(info); | 9543 measureAsSameValueOverloadedMethod1Method(info); |
9642 return; | 9544 return; |
9643 } | 9545 } |
9644 break; | 9546 break; |
9645 case 1: | 9547 case 1: |
9646 if (true) { | 9548 if (true) { |
9647 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); | 9549 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); |
9648 measureAsSameValueOverloadedMethod2Method(info); | 9550 measureAsSameValueOverloadedMethod2Method(info); |
9649 return; | 9551 return; |
9650 } | 9552 } |
9651 break; | 9553 break; |
9652 default: | 9554 default: |
9653 break; | 9555 break; |
9654 } | 9556 } |
9655 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9557 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9656 exceptionState.throwIfNeeded(); | |
9657 return; | 9558 return; |
9658 } | 9559 } |
9659 | 9560 |
9660 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 9561 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
9661 { | 9562 { |
9662 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); | 9563 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); |
9663 } | 9564 } |
9664 | 9565 |
9665 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9566 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
9666 { | 9567 { |
9667 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9568 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9668 impl->deprecateAsMeasureAsSameValueOverloadedMethod(); | 9569 impl->deprecateAsMeasureAsSameValueOverloadedMethod(); |
9669 } | 9570 } |
9670 | 9571 |
9671 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9572 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
9672 { | 9573 { |
9673 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 9574 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
9674 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9575 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9675 int arg; | 9576 int arg; |
9676 { | 9577 { |
9677 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9578 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9678 if (exceptionState.throwIfNeeded()) | 9579 if (exceptionState.hadException()) |
9679 return; | 9580 return; |
9680 } | 9581 } |
9681 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); | 9582 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); |
9682 } | 9583 } |
9683 | 9584 |
9684 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 9585 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
9685 { | 9586 { |
9686 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 9587 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
9687 switch (std::min(1, info.Length())) { | 9588 switch (std::min(1, info.Length())) { |
9688 case 0: | 9589 case 0: |
9689 if (true) { | 9590 if (true) { |
9690 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); | 9591 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); |
9691 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); | 9592 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
9692 deprecateAsMeasureAsSameValueOverloadedMethod1Method(info); | 9593 deprecateAsMeasureAsSameValueOverloadedMethod1Method(info); |
9693 return; | 9594 return; |
9694 } | 9595 } |
9695 break; | 9596 break; |
9696 case 1: | 9597 case 1: |
9697 if (true) { | 9598 if (true) { |
9698 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); | 9599 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeature); |
9699 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); | 9600 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c
urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
9700 deprecateAsMeasureAsSameValueOverloadedMethod2Method(info); | 9601 deprecateAsMeasureAsSameValueOverloadedMethod2Method(info); |
9701 return; | 9602 return; |
9702 } | 9603 } |
9703 break; | 9604 break; |
9704 default: | 9605 default: |
9705 break; | 9606 break; |
9706 } | 9607 } |
9707 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9608 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9708 exceptionState.throwIfNeeded(); | |
9709 return; | 9609 return; |
9710 } | 9610 } |
9711 | 9611 |
9712 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9612 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
9713 { | 9613 { |
9714 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in
fo); | 9614 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in
fo); |
9715 } | 9615 } |
9716 | 9616 |
9717 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9617 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
9718 { | 9618 { |
9719 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9619 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9720 impl->deprecateAsSameValueMeasureAsOverloadedMethod(); | 9620 impl->deprecateAsSameValueMeasureAsOverloadedMethod(); |
9721 } | 9621 } |
9722 | 9622 |
9723 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9623 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
9724 { | 9624 { |
9725 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 9625 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
9726 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9626 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9727 int arg; | 9627 int arg; |
9728 { | 9628 { |
9729 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9629 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9730 if (exceptionState.throwIfNeeded()) | 9630 if (exceptionState.hadException()) |
9731 return; | 9631 return; |
9732 } | 9632 } |
9733 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); | 9633 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); |
9734 } | 9634 } |
9735 | 9635 |
9736 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 9636 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
9737 { | 9637 { |
9738 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 9638 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
9739 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::TestFeature); | 9639 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
9740 switch (std::min(1, info.Length())) { | 9640 switch (std::min(1, info.Length())) { |
9741 case 0: | 9641 case 0: |
9742 if (true) { | 9642 if (true) { |
9743 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureA); | 9643 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
9744 deprecateAsSameValueMeasureAsOverloadedMethod1Method(info); | 9644 deprecateAsSameValueMeasureAsOverloadedMethod1Method(info); |
9745 return; | 9645 return; |
9746 } | 9646 } |
9747 break; | 9647 break; |
9748 case 1: | 9648 case 1: |
9749 if (true) { | 9649 if (true) { |
9750 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); | 9650 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
9751 deprecateAsSameValueMeasureAsOverloadedMethod2Method(info); | 9651 deprecateAsSameValueMeasureAsOverloadedMethod2Method(info); |
9752 return; | 9652 return; |
9753 } | 9653 } |
9754 break; | 9654 break; |
9755 default: | 9655 default: |
9756 break; | 9656 break; |
9757 } | 9657 } |
9758 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9658 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9759 exceptionState.throwIfNeeded(); | |
9760 return; | 9659 return; |
9761 } | 9660 } |
9762 | 9661 |
9763 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9662 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
9764 { | 9663 { |
9765 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in
fo); | 9664 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in
fo); |
9766 } | 9665 } |
9767 | 9666 |
9768 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9667 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const
v8::FunctionCallbackInfo<v8::Value>& info) |
9769 { | 9668 { |
9770 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9669 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9771 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); | 9670 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); |
9772 } | 9671 } |
9773 | 9672 |
9774 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9673 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
v8::FunctionCallbackInfo<v8::Value>& info) |
9775 { | 9674 { |
9776 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); | 9675 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); |
9777 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9676 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
9778 int arg; | 9677 int arg; |
9779 { | 9678 { |
9780 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 9679 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
9781 if (exceptionState.throwIfNeeded()) | 9680 if (exceptionState.hadException()) |
9782 return; | 9681 return; |
9783 } | 9682 } |
9784 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); | 9683 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); |
9785 } | 9684 } |
9786 | 9685 |
9787 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 9686 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
9788 { | 9687 { |
9789 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); | 9688 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); |
9790 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); | 9689 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
9791 switch (std::min(1, info.Length())) { | 9690 switch (std::min(1, info.Length())) { |
9792 case 0: | 9691 case 0: |
9793 if (true) { | 9692 if (true) { |
9794 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); | 9693 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
9795 deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info); | 9694 deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info); |
9796 return; | 9695 return; |
9797 } | 9696 } |
9798 break; | 9697 break; |
9799 case 1: | 9698 case 1: |
9800 if (true) { | 9699 if (true) { |
9801 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); | 9700 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut
ionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
9802 deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info); | 9701 deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info); |
9803 return; | 9702 return; |
9804 } | 9703 } |
9805 break; | 9704 break; |
9806 default: | 9705 default: |
9807 break; | 9706 break; |
9808 } | 9707 } |
9809 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 9708 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
9810 exceptionState.throwIfNeeded(); | |
9811 return; | 9709 return; |
9812 } | 9710 } |
9813 | 9711 |
9814 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 9712 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
9815 { | 9713 { |
9816 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod
Method(info); | 9714 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod
Method(info); |
9817 } | 9715 } |
9818 | 9716 |
9819 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 9717 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
9820 { | 9718 { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9926 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain
World(const v8::FunctionCallbackInfo<v8::Value>& info) | 9824 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain
World(const v8::FunctionCallbackInfo<v8::Value>& info) |
9927 { | 9825 { |
9928 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF
orMainWorld(info); | 9826 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF
orMainWorld(info); |
9929 } | 9827 } |
9930 | 9828 |
9931 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::
FunctionCallbackInfo<v8::Value>& info) | 9829 void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::
FunctionCallbackInfo<v8::Value>& info) |
9932 { | 9830 { |
9933 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage
", interfaceName, info.Holder(), info.GetIsolate()); | 9831 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage
", interfaceName, info.Holder(), info.GetIsolate()); |
9934 if (UNLIKELY(info.Length() < 1)) { | 9832 if (UNLIKELY(info.Length() < 1)) { |
9935 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 9833 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
9936 exceptionState.throwIfNeeded(); | |
9937 return; | 9834 return; |
9938 } | 9835 } |
9939 Transferables transferables; | 9836 Transferables transferables; |
9940 if (info.Length() > 1) { | 9837 if (info.Length() > 1) { |
9941 const int transferablesArgIndex = 1; | 9838 const int transferablesArgIndex = 1; |
9942 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState))
{ | 9839 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info
[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState))
{ |
9943 exceptionState.throwIfNeeded(); | |
9944 return; | 9840 return; |
9945 } | 9841 } |
9946 } | 9842 } |
9947 RefPtr<SerializedScriptValue> message = SerializedScriptValue::serialize(inf
o.GetIsolate(), info[0], &transferables, nullptr, exceptionState); | 9843 RefPtr<SerializedScriptValue> message = SerializedScriptValue::serialize(inf
o.GetIsolate(), info[0], &transferables, nullptr, exceptionState); |
9948 if (exceptionState.throwIfNeeded()) | 9844 if (exceptionState.hadException()) |
9949 return; | 9845 return; |
9950 // FIXME: Only pass context/exceptionState if instance really requires it. | 9846 // FIXME: Only pass context/exceptionState if instance really requires it. |
9951 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); | 9847 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
9952 instance->postMessage(context, message.release(), transferables.messagePorts
, exceptionState); | 9848 instance->postMessage(context, message.release(), transferables.messagePorts
, exceptionState); |
9953 exceptionState.throwIfNeeded(); | |
9954 } | 9849 } |
9955 | 9850 |
9956 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 9851 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
9957 { | 9852 { |
9958 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); | 9853 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); |
9959 } | 9854 } |
9960 | 9855 |
9961 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9856 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) |
9962 { | 9857 { |
9963 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9858 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10022 { | 9917 { |
10023 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); | 9918 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); |
10024 } | 9919 } |
10025 | 9920 |
10026 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 9921 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
10027 { | 9922 { |
10028 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9923 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
10029 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9924 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10030 impl->raisesExceptionVoidMethod(exceptionState); | 9925 impl->raisesExceptionVoidMethod(exceptionState); |
10031 if (exceptionState.hadException()) { | 9926 if (exceptionState.hadException()) { |
10032 exceptionState.throwIfNeeded(); | |
10033 return; | 9927 return; |
10034 } | 9928 } |
10035 } | 9929 } |
10036 | 9930 |
10037 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 9931 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
10038 { | 9932 { |
10039 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); | 9933 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); |
10040 } | 9934 } |
10041 | 9935 |
10042 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 9936 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
10043 { | 9937 { |
10044 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9938 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); |
10045 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9939 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10046 String result = impl->raisesExceptionStringMethod(exceptionState); | 9940 String result = impl->raisesExceptionStringMethod(exceptionState); |
10047 if (exceptionState.hadException()) { | 9941 if (exceptionState.hadException()) { |
10048 exceptionState.throwIfNeeded(); | |
10049 return; | 9942 return; |
10050 } | 9943 } |
10051 v8SetReturnValueString(info, result, info.GetIsolate()); | 9944 v8SetReturnValueString(info, result, info.GetIsolate()); |
10052 } | 9945 } |
10053 | 9946 |
10054 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 9947 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
10055 { | 9948 { |
10056 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | 9949 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); |
10057 } | 9950 } |
10058 | 9951 |
10059 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 9952 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
10060 { | 9953 { |
10061 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 9954 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
10062 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9955 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10063 int optionalLongArg; | 9956 int optionalLongArg; |
10064 { | 9957 { |
10065 int numArgsPassed = info.Length(); | 9958 int numArgsPassed = info.Length(); |
10066 while (numArgsPassed > 0) { | 9959 while (numArgsPassed > 0) { |
10067 if (!info[numArgsPassed - 1]->IsUndefined()) | 9960 if (!info[numArgsPassed - 1]->IsUndefined()) |
10068 break; | 9961 break; |
10069 --numArgsPassed; | 9962 --numArgsPassed; |
10070 } | 9963 } |
10071 if (UNLIKELY(numArgsPassed <= 0)) { | 9964 if (UNLIKELY(numArgsPassed <= 0)) { |
10072 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 9965 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
10073 if (exceptionState.hadException()) { | 9966 if (exceptionState.hadException()) { |
10074 exceptionState.throwIfNeeded(); | |
10075 return; | 9967 return; |
10076 } | 9968 } |
10077 return; | 9969 return; |
10078 } | 9970 } |
10079 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); | 9971 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion,
exceptionState); |
10080 if (exceptionState.throwIfNeeded()) | 9972 if (exceptionState.hadException()) |
10081 return; | 9973 return; |
10082 } | 9974 } |
10083 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); | 9975 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); |
10084 if (exceptionState.hadException()) { | 9976 if (exceptionState.hadException()) { |
10085 exceptionState.throwIfNeeded(); | |
10086 return; | 9977 return; |
10087 } | 9978 } |
10088 } | 9979 } |
10089 | 9980 |
10090 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 9981 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
10091 { | 9982 { |
10092 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); | 9983 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); |
10093 } | 9984 } |
10094 | 9985 |
10095 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 9986 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
10096 { | 9987 { |
10097 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | 9988 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); |
10098 if (UNLIKELY(info.Length() < 1)) { | 9989 if (UNLIKELY(info.Length() < 1)) { |
10099 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 9990 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10100 exceptionState.throwIfNeeded(); | |
10101 return; | 9991 return; |
10102 } | 9992 } |
10103 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9993 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10104 TestCallbackInterface* testCallbackInterfaceArg; | 9994 TestCallbackInterface* testCallbackInterfaceArg; |
10105 { | 9995 { |
10106 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 9996 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
10107 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 9997 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
10108 exceptionState.throwIfNeeded(); | |
10109 return; | 9998 return; |
10110 } | 9999 } |
10111 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8:
:Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 10000 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8:
:Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
10112 } | 10001 } |
10113 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg, exceptionState); | 10002 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg, exceptionState); |
10114 if (exceptionState.hadException()) { | 10003 if (exceptionState.hadException()) { |
10115 exceptionState.throwIfNeeded(); | |
10116 return; | 10004 return; |
10117 } | 10005 } |
10118 } | 10006 } |
10119 | 10007 |
10120 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 10008 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
10121 { | 10009 { |
10122 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 10010 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
10123 } | 10011 } |
10124 | 10012 |
10125 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 10013 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
10126 { | 10014 { |
10127 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 10015 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
10128 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10016 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10129 TestCallbackInterface* optionalTestCallbackInterfaceArg; | 10017 TestCallbackInterface* optionalTestCallbackInterfaceArg; |
10130 { | 10018 { |
10131 if (!isUndefinedOrNull(info[0])) { | 10019 if (!isUndefinedOrNull(info[0])) { |
10132 if (!info[0]->IsFunction()) { | 10020 if (!info[0]->IsFunction()) { |
10133 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); | 10021 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); |
10134 exceptionState.throwIfNeeded(); | |
10135 return; | 10022 return; |
10136 } | 10023 } |
10137 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 10024 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
10138 } else { | 10025 } else { |
10139 optionalTestCallbackInterfaceArg = nullptr; | 10026 optionalTestCallbackInterfaceArg = nullptr; |
10140 } | 10027 } |
10141 } | 10028 } |
10142 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg, exceptionState); | 10029 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg, exceptionState); |
10143 if (exceptionState.hadException()) { | 10030 if (exceptionState.hadException()) { |
10144 exceptionState.throwIfNeeded(); | |
10145 return; | 10031 return; |
10146 } | 10032 } |
10147 } | 10033 } |
10148 | 10034 |
10149 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 10035 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
10150 { | 10036 { |
10151 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 10037 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
10152 } | 10038 } |
10153 | 10039 |
10154 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 10040 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
10155 { | 10041 { |
10156 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 10042 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
10157 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10043 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10158 TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMeth
od(exceptionState); | 10044 TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMeth
od(exceptionState); |
10159 if (exceptionState.hadException()) { | 10045 if (exceptionState.hadException()) { |
10160 exceptionState.throwIfNeeded(); | |
10161 return; | 10046 return; |
10162 } | 10047 } |
10163 v8SetReturnValue(info, result); | 10048 v8SetReturnValue(info, result); |
10164 } | 10049 } |
10165 | 10050 |
10166 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 10051 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
10167 { | 10052 { |
10168 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | 10053 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); |
10169 } | 10054 } |
10170 | 10055 |
10171 static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 10056 static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
10172 { | 10057 { |
10173 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionXPathNSResolverVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 10058 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionXPathNSResolverVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
10174 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10059 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10175 XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exc
eptionState); | 10060 XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exc
eptionState); |
10176 if (exceptionState.hadException()) { | 10061 if (exceptionState.hadException()) { |
10177 exceptionState.throwIfNeeded(); | |
10178 return; | 10062 return; |
10179 } | 10063 } |
10180 v8SetReturnValue(info, result); | 10064 v8SetReturnValue(info, result); |
10181 } | 10065 } |
10182 | 10066 |
10183 static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 10067 static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
10184 { | 10068 { |
10185 TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info); | 10069 TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info); |
10186 } | 10070 } |
10187 | 10071 |
10188 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10072 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
10189 { | 10073 { |
10190 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 10074 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); |
10191 if (UNLIKELY(info.Length() < 1)) { | 10075 if (UNLIKELY(info.Length() < 1)) { |
10192 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10076 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10193 exceptionState.throwIfNeeded(); | |
10194 return; | 10077 return; |
10195 } | 10078 } |
10196 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10079 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10197 int longArg; | 10080 int longArg; |
10198 { | 10081 { |
10199 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 10082 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
10200 if (exceptionState.throwIfNeeded()) | 10083 if (exceptionState.hadException()) |
10201 return; | 10084 return; |
10202 } | 10085 } |
10203 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 10086 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
10204 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont
ext, longArg, exceptionState); | 10087 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont
ext, longArg, exceptionState); |
10205 if (exceptionState.hadException()) { | 10088 if (exceptionState.hadException()) { |
10206 exceptionState.throwIfNeeded(); | |
10207 return; | 10089 return; |
10208 } | 10090 } |
10209 } | 10091 } |
10210 | 10092 |
10211 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10093 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
10212 { | 10094 { |
10213 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); | 10095 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); |
10214 } | 10096 } |
10215 | 10097 |
10216 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 10098 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10258 impl->runtimeEnabledOverloadedVoidMethod(stringArg); | 10140 impl->runtimeEnabledOverloadedVoidMethod(stringArg); |
10259 } | 10141 } |
10260 | 10142 |
10261 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 10143 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
10262 { | 10144 { |
10263 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 10145 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
10264 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10146 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10265 int longArg; | 10147 int longArg; |
10266 { | 10148 { |
10267 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 10149 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
10268 if (exceptionState.throwIfNeeded()) | 10150 if (exceptionState.hadException()) |
10269 return; | 10151 return; |
10270 } | 10152 } |
10271 impl->runtimeEnabledOverloadedVoidMethod(longArg); | 10153 impl->runtimeEnabledOverloadedVoidMethod(longArg); |
10272 } | 10154 } |
10273 | 10155 |
10274 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 10156 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
10275 { | 10157 { |
10276 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 10158 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
10277 switch (std::min(1, info.Length())) { | 10159 switch (std::min(1, info.Length())) { |
10278 case 1: | 10160 case 1: |
10279 if (info[0]->IsNumber()) { | 10161 if (info[0]->IsNumber()) { |
10280 runtimeEnabledOverloadedVoidMethod2Method(info); | 10162 runtimeEnabledOverloadedVoidMethod2Method(info); |
10281 return; | 10163 return; |
10282 } | 10164 } |
10283 if (true) { | 10165 if (true) { |
10284 runtimeEnabledOverloadedVoidMethod1Method(info); | 10166 runtimeEnabledOverloadedVoidMethod1Method(info); |
10285 return; | 10167 return; |
10286 } | 10168 } |
10287 if (true) { | 10169 if (true) { |
10288 runtimeEnabledOverloadedVoidMethod2Method(info); | 10170 runtimeEnabledOverloadedVoidMethod2Method(info); |
10289 return; | 10171 return; |
10290 } | 10172 } |
10291 break; | 10173 break; |
10292 default: | 10174 default: |
10293 break; | 10175 break; |
10294 } | 10176 } |
10295 if (info.Length() < 1) { | 10177 if (info.Length() < 1) { |
10296 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 10178 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
10297 exceptionState.throwIfNeeded(); | |
10298 return; | 10179 return; |
10299 } | 10180 } |
10300 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 10181 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
10301 exceptionState.throwIfNeeded(); | |
10302 return; | 10182 return; |
10303 } | 10183 } |
10304 | 10184 |
10305 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 10185 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
10306 { | 10186 { |
10307 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); | 10187 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); |
10308 } | 10188 } |
10309 | 10189 |
10310 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | 10190 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio
nCallbackInfo<v8::Value>& info) |
10311 { | 10191 { |
(...skipping 22 matching lines...) Expand all Loading... |
10334 } | 10214 } |
10335 | 10215 |
10336 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | 10216 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio
nCallbackInfo<v8::Value>& info) |
10337 { | 10217 { |
10338 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 10218 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
10339 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10219 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10340 int longArg; | 10220 int longArg; |
10341 V8StringResource<> stringArg; | 10221 V8StringResource<> stringArg; |
10342 { | 10222 { |
10343 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 10223 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
10344 if (exceptionState.throwIfNeeded()) | 10224 if (exceptionState.hadException()) |
10345 return; | 10225 return; |
10346 stringArg = info[1]; | 10226 stringArg = info[1]; |
10347 if (!stringArg.prepare()) | 10227 if (!stringArg.prepare()) |
10348 return; | 10228 return; |
10349 } | 10229 } |
10350 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg); | 10230 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg); |
10351 } | 10231 } |
10352 | 10232 |
10353 static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | 10233 static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::Functio
nCallbackInfo<v8::Value>& info) |
10354 { | 10234 { |
10355 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 10235 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
10356 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10236 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10357 int longArg; | 10237 int longArg; |
10358 V8StringResource<> stringArg; | 10238 V8StringResource<> stringArg; |
10359 TestInterfaceImplementation* testInterfaceArg; | 10239 TestInterfaceImplementation* testInterfaceArg; |
10360 { | 10240 { |
10361 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); | 10241 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio
nState); |
10362 if (exceptionState.throwIfNeeded()) | 10242 if (exceptionState.hadException()) |
10363 return; | 10243 return; |
10364 stringArg = info[1]; | 10244 stringArg = info[1]; |
10365 if (!stringArg.prepare()) | 10245 if (!stringArg.prepare()) |
10366 return; | 10246 return; |
10367 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(
), info[2]); | 10247 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(
), info[2]); |
10368 if (!testInterfaceArg) { | 10248 if (!testInterfaceArg) { |
10369 exceptionState.throwTypeError("parameter 3 is not of type 'TestInter
face'."); | 10249 exceptionState.throwTypeError("parameter 3 is not of type 'TestInter
face'."); |
10370 exceptionState.throwIfNeeded(); | |
10371 return; | 10250 return; |
10372 } | 10251 } |
10373 } | 10252 } |
10374 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg, testIn
terfaceArg); | 10253 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg, testIn
terfaceArg); |
10375 } | 10254 } |
10376 | 10255 |
10377 static int partiallyRuntimeEnabledOverloadedVoidMethodMethodLength() | 10256 static int partiallyRuntimeEnabledOverloadedVoidMethodMethodLength() |
10378 { | 10257 { |
10379 if (RuntimeEnabledFeatures::featureName1Enabled()) { | 10258 if (RuntimeEnabledFeatures::featureName1Enabled()) { |
10380 return 1; | 10259 return 1; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10423 partiallyRuntimeEnabledOverloadedVoidMethod4Method(info); | 10302 partiallyRuntimeEnabledOverloadedVoidMethod4Method(info); |
10424 return; | 10303 return; |
10425 } | 10304 } |
10426 } | 10305 } |
10427 break; | 10306 break; |
10428 default: | 10307 default: |
10429 break; | 10308 break; |
10430 } | 10309 } |
10431 if (info.Length() < TestObjectV8Internal::partiallyRuntimeEnabledOverloadedV
oidMethodMethodLength()) { | 10310 if (info.Length() < TestObjectV8Internal::partiallyRuntimeEnabledOverloadedV
oidMethodMethodLength()) { |
10432 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(Test
ObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), inf
o.Length())); | 10311 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(Test
ObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), inf
o.Length())); |
10433 exceptionState.throwIfNeeded(); | |
10434 return; | 10312 return; |
10435 } | 10313 } |
10436 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 10314 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
10437 exceptionState.throwIfNeeded(); | |
10438 return; | 10315 return; |
10439 } | 10316 } |
10440 | 10317 |
10441 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 10318 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
10442 { | 10319 { |
10443 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info
); | 10320 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info
); |
10444 } | 10321 } |
10445 | 10322 |
10446 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 10323 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
10447 { | 10324 { |
(...skipping 16 matching lines...) Expand all Loading... |
10464 | 10341 |
10465 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10342 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10466 { | 10343 { |
10467 ExceptionState exceptionState(ExceptionState::ExecutionContext, "legacyInter
faceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Hol
der(), info.GetIsolate()); | 10344 ExceptionState exceptionState(ExceptionState::ExecutionContext, "legacyInter
faceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Hol
der(), info.GetIsolate()); |
10468 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10345 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10469 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyArg; | 10346 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyArg; |
10470 { | 10347 { |
10471 for (int i = 0; i < info.Length(); ++i) { | 10348 for (int i = 0; i < info.Length(); ++i) { |
10472 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 10349 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
10473 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); | 10350 exceptionState.throwTypeError("parameter 1 is not of type 'TestI
nterfaceEmpty'."); |
10474 exceptionState.throwIfNeeded(); | |
10475 return; | 10351 return; |
10476 } | 10352 } |
10477 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<
v8::Object>::Cast(info[i]))); | 10353 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<
v8::Object>::Cast(info[i]))); |
10478 } | 10354 } |
10479 } | 10355 } |
10480 impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg(tes
tInterfaceEmptyArg); | 10356 impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg(tes
tInterfaceEmptyArg); |
10481 } | 10357 } |
10482 | 10358 |
10483 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10359 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
10484 { | 10360 { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10591 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 10467 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
10592 { | 10468 { |
10593 TestObjectV8Internal::unforgeableVoidMethodMethod(info); | 10469 TestObjectV8Internal::unforgeableVoidMethodMethod(info); |
10594 } | 10470 } |
10595 | 10471 |
10596 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | 10472 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) |
10597 { | 10473 { |
10598 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceGarbageCollectedSequenceArg", "TestObject", info.Holder(), info.GetI
solate()); | 10474 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceGarbageCollectedSequenceArg", "TestObject", info.Holder(), info.GetI
solate()); |
10599 if (UNLIKELY(info.Length() < 1)) { | 10475 if (UNLIKELY(info.Length() < 1)) { |
10600 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10476 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10601 exceptionState.throwIfNeeded(); | |
10602 return; | 10477 return; |
10603 } | 10478 } |
10604 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10479 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10605 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec
tedSequenceArg; | 10480 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec
tedSequenceArg; |
10606 { | 10481 { |
10607 testInterfaceGarbageCollectedSequenceArg = (toMemberNativeArray<TestInte
rfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); | 10482 testInterfaceGarbageCollectedSequenceArg = (toMemberNativeArray<TestInte
rfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); |
10608 if (exceptionState.throwIfNeeded()) | 10483 if (exceptionState.hadException()) |
10609 return; | 10484 return; |
10610 } | 10485 } |
10611 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag
eCollectedSequenceArg); | 10486 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag
eCollectedSequenceArg); |
10612 } | 10487 } |
10613 | 10488 |
10614 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 10489 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
10615 { | 10490 { |
10616 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth
od(info); | 10491 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth
od(info); |
10617 } | 10492 } |
10618 | 10493 |
10619 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 10494 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
10620 { | 10495 { |
10621 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceGarbageCollectedArrayArg", "TestObject", info.Holder(), info.GetIsol
ate()); | 10496 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceGarbageCollectedArrayArg", "TestObject", info.Holder(), info.GetIsol
ate()); |
10622 if (UNLIKELY(info.Length() < 1)) { | 10497 if (UNLIKELY(info.Length() < 1)) { |
10623 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10498 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10624 exceptionState.throwIfNeeded(); | |
10625 return; | 10499 return; |
10626 } | 10500 } |
10627 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10501 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10628 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec
tedArrayArg; | 10502 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec
tedArrayArg; |
10629 { | 10503 { |
10630 testInterfaceGarbageCollectedArrayArg = (toMemberNativeArray<TestInterfa
ceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); | 10504 testInterfaceGarbageCollectedArrayArg = (toMemberNativeArray<TestInterfa
ceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); |
10631 if (exceptionState.throwIfNeeded()) | 10505 if (exceptionState.hadException()) |
10632 return; | 10506 return; |
10633 } | 10507 } |
10634 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo
llectedArrayArg); | 10508 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo
llectedArrayArg); |
10635 } | 10509 } |
10636 | 10510 |
10637 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10511 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
10638 { | 10512 { |
10639 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(
info); | 10513 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(
info); |
10640 } | 10514 } |
10641 | 10515 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10688 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 10562 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
10689 { | 10563 { |
10690 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); | 10564 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); |
10691 } | 10565 } |
10692 | 10566 |
10693 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 10567 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
10694 { | 10568 { |
10695 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); | 10569 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); |
10696 if (UNLIKELY(info.Length() < 1)) { | 10570 if (UNLIKELY(info.Length() < 1)) { |
10697 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10571 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10698 exceptionState.throwIfNeeded(); | |
10699 return; | 10572 return; |
10700 } | 10573 } |
10701 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10574 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10702 int value; | 10575 int value; |
10703 { | 10576 { |
10704 value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionS
tate); | 10577 value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionS
tate); |
10705 if (exceptionState.throwIfNeeded()) | 10578 if (exceptionState.hadException()) |
10706 return; | 10579 return; |
10707 } | 10580 } |
10708 int result = 0; | 10581 int result = 0; |
10709 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP
rivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurre
ntContext())), impl, value, &result)) | 10582 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP
rivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurre
ntContext())), impl, value, &result)) |
10710 return; | 10583 return; |
10711 v8SetReturnValueInt(info, result); | 10584 v8SetReturnValueInt(info, result); |
10712 } | 10585 } |
10713 | 10586 |
10714 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 10587 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
10715 { | 10588 { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10764 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 10637 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
10765 { | 10638 { |
10766 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); | 10639 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); |
10767 } | 10640 } |
10768 | 10641 |
10769 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10642 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
10770 { | 10643 { |
10771 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); | 10644 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); |
10772 if (UNLIKELY(info.Length() < 5)) { | 10645 if (UNLIKELY(info.Length() < 5)) { |
10773 setMinimumArityTypeError(exceptionState, 5, info.Length()); | 10646 setMinimumArityTypeError(exceptionState, 5, info.Length()); |
10774 exceptionState.throwIfNeeded(); | |
10775 return; | 10647 return; |
10776 } | 10648 } |
10777 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10649 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10778 Document* document; | 10650 Document* document; |
10779 Node* node; | 10651 Node* node; |
10780 int value1; | 10652 int value1; |
10781 double value2; | 10653 double value2; |
10782 V8StringResource<> string; | 10654 V8StringResource<> string; |
10783 { | 10655 { |
10784 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 10656 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
10785 if (!document) { | 10657 if (!document) { |
10786 exceptionState.throwTypeError("parameter 1 is not of type 'Document'
."); | 10658 exceptionState.throwTypeError("parameter 1 is not of type 'Document'
."); |
10787 exceptionState.throwIfNeeded(); | |
10788 return; | 10659 return; |
10789 } | 10660 } |
10790 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); | 10661 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
10791 if (!node) { | 10662 if (!node) { |
10792 exceptionState.throwTypeError("parameter 2 is not of type 'Node'."); | 10663 exceptionState.throwTypeError("parameter 2 is not of type 'Node'."); |
10793 exceptionState.throwIfNeeded(); | |
10794 return; | 10664 return; |
10795 } | 10665 } |
10796 value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exception
State); | 10666 value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exception
State); |
10797 if (exceptionState.throwIfNeeded()) | 10667 if (exceptionState.hadException()) |
10798 return; | 10668 return; |
10799 value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); | 10669 value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); |
10800 if (exceptionState.throwIfNeeded()) | 10670 if (exceptionState.hadException()) |
10801 return; | 10671 return; |
10802 string = info[4]; | 10672 string = info[4]; |
10803 if (!string.prepare()) | 10673 if (!string.prepare()) |
10804 return; | 10674 return; |
10805 } | 10675 } |
10806 Node* result = nullptr; | 10676 Node* result = nullptr; |
10807 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur
rentContext())), impl, document, node, value1, value2, string, &result)) | 10677 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur
rentContext())), impl, document, node, value1, value2, string, &result)) |
10808 return; | 10678 return; |
10809 v8SetReturnValue(info, result); | 10679 v8SetReturnValue(info, result); |
10810 } | 10680 } |
10811 | 10681 |
10812 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10682 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
10813 { | 10683 { |
10814 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); | 10684 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); |
10815 } | 10685 } |
10816 | 10686 |
10817 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 10687 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
10818 { | 10688 { |
10819 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); | 10689 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); |
10820 if (UNLIKELY(info.Length() < 2)) { | 10690 if (UNLIKELY(info.Length() < 2)) { |
10821 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 10691 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
10822 exceptionState.throwIfNeeded(); | |
10823 return; | 10692 return; |
10824 } | 10693 } |
10825 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10694 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10826 int value1; | 10695 int value1; |
10827 int value2; | 10696 int value2; |
10828 { | 10697 { |
10829 value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exception
State); | 10698 value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exception
State); |
10830 if (exceptionState.throwIfNeeded()) | 10699 if (exceptionState.hadException()) |
10831 return; | 10700 return; |
10832 value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exception
State); | 10701 value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exception
State); |
10833 if (exceptionState.throwIfNeeded()) | 10702 if (exceptionState.hadException()) |
10834 return; | 10703 return; |
10835 } | 10704 } |
10836 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); | 10705 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); |
10837 } | 10706 } |
10838 | 10707 |
10839 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 10708 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
10840 { | 10709 { |
10841 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; | 10710 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; |
10842 } | 10711 } |
10843 | 10712 |
10844 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10713 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10845 { | 10714 { |
10846 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tObject", info.Holder(), info.GetIsolate()); | 10715 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tObject", info.Holder(), info.GetIsolate()); |
10847 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10716 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10848 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10717 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10849 Iterator* result = impl->keysForBinding(scriptState, exceptionState); | 10718 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
10850 if (exceptionState.hadException()) { | 10719 if (exceptionState.hadException()) { |
10851 exceptionState.throwIfNeeded(); | |
10852 return; | 10720 return; |
10853 } | 10721 } |
10854 v8SetReturnValue(info, result); | 10722 v8SetReturnValue(info, result); |
10855 } | 10723 } |
10856 | 10724 |
10857 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10725 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
10858 { | 10726 { |
10859 TestObjectV8Internal::keysMethod(info); | 10727 TestObjectV8Internal::keysMethod(info); |
10860 } | 10728 } |
10861 | 10729 |
10862 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10730 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10863 { | 10731 { |
10864 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estObject", info.Holder(), info.GetIsolate()); | 10732 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estObject", info.Holder(), info.GetIsolate()); |
10865 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10733 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10866 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10734 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10867 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | 10735 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
10868 if (exceptionState.hadException()) { | 10736 if (exceptionState.hadException()) { |
10869 exceptionState.throwIfNeeded(); | |
10870 return; | 10737 return; |
10871 } | 10738 } |
10872 v8SetReturnValue(info, result); | 10739 v8SetReturnValue(info, result); |
10873 } | 10740 } |
10874 | 10741 |
10875 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 10742 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
10876 { | 10743 { |
10877 TestObjectV8Internal::valuesMethod(info); | 10744 TestObjectV8Internal::valuesMethod(info); |
10878 } | 10745 } |
10879 | 10746 |
10880 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10747 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10881 { | 10748 { |
10882 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestObject", info.Holder(), info.GetIsolate()); | 10749 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestObject", info.Holder(), info.GetIsolate()); |
10883 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10750 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10884 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10751 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10885 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | 10752 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
10886 if (exceptionState.hadException()) { | 10753 if (exceptionState.hadException()) { |
10887 exceptionState.throwIfNeeded(); | |
10888 return; | 10754 return; |
10889 } | 10755 } |
10890 v8SetReturnValue(info, result); | 10756 v8SetReturnValue(info, result); |
10891 } | 10757 } |
10892 | 10758 |
10893 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 10759 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
10894 { | 10760 { |
10895 TestObjectV8Internal::entriesMethod(info); | 10761 TestObjectV8Internal::entriesMethod(info); |
10896 } | 10762 } |
10897 | 10763 |
10898 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10764 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10899 { | 10765 { |
10900 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestObject", info.Holder(), info.GetIsolate()); | 10766 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestObject", info.Holder(), info.GetIsolate()); |
10901 if (UNLIKELY(info.Length() < 1)) { | 10767 if (UNLIKELY(info.Length() < 1)) { |
10902 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10768 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10903 exceptionState.throwIfNeeded(); | |
10904 return; | 10769 return; |
10905 } | 10770 } |
10906 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10771 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10907 ScriptValue callback; | 10772 ScriptValue callback; |
10908 ScriptValue thisArg; | 10773 ScriptValue thisArg; |
10909 { | 10774 { |
10910 if (!info[0]->IsFunction()) { | 10775 if (!info[0]->IsFunction()) { |
10911 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 10776 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
10912 exceptionState.throwIfNeeded(); | |
10913 return; | 10777 return; |
10914 } | 10778 } |
10915 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 10779 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
10916 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 10780 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
10917 } | 10781 } |
10918 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10782 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10919 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); | 10783 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); |
10920 if (exceptionState.hadException()) { | 10784 if (exceptionState.hadException()) { |
10921 exceptionState.throwIfNeeded(); | |
10922 return; | 10785 return; |
10923 } | 10786 } |
10924 } | 10787 } |
10925 | 10788 |
10926 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 10789 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
10927 { | 10790 { |
10928 TestObjectV8Internal::forEachMethod(info); | 10791 TestObjectV8Internal::forEachMethod(info); |
10929 } | 10792 } |
10930 | 10793 |
10931 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10794 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10932 { | 10795 { |
10933 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
Object", info.Holder(), info.GetIsolate()); | 10796 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
Object", info.Holder(), info.GetIsolate()); |
10934 if (UNLIKELY(info.Length() < 1)) { | 10797 if (UNLIKELY(info.Length() < 1)) { |
10935 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10798 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10936 exceptionState.throwIfNeeded(); | |
10937 return; | 10799 return; |
10938 } | 10800 } |
10939 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10801 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10940 int key; | 10802 int key; |
10941 { | 10803 { |
10942 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 10804 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
10943 if (exceptionState.throwIfNeeded()) | 10805 if (exceptionState.hadException()) |
10944 return; | 10806 return; |
10945 } | 10807 } |
10946 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10808 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10947 bool result = impl->hasForBinding(scriptState, key, exceptionState); | 10809 bool result = impl->hasForBinding(scriptState, key, exceptionState); |
10948 if (exceptionState.hadException()) { | 10810 if (exceptionState.hadException()) { |
10949 exceptionState.throwIfNeeded(); | |
10950 return; | 10811 return; |
10951 } | 10812 } |
10952 v8SetReturnValueBool(info, result); | 10813 v8SetReturnValueBool(info, result); |
10953 } | 10814 } |
10954 | 10815 |
10955 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10816 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
10956 { | 10817 { |
10957 TestObjectV8Internal::hasMethod(info); | 10818 TestObjectV8Internal::hasMethod(info); |
10958 } | 10819 } |
10959 | 10820 |
10960 static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10821 static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10961 { | 10822 { |
10962 ExceptionState exceptionState(ExceptionState::ExecutionContext, "get", "Test
Object", info.Holder(), info.GetIsolate()); | 10823 ExceptionState exceptionState(ExceptionState::ExecutionContext, "get", "Test
Object", info.Holder(), info.GetIsolate()); |
10963 if (UNLIKELY(info.Length() < 1)) { | 10824 if (UNLIKELY(info.Length() < 1)) { |
10964 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10825 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
10965 exceptionState.throwIfNeeded(); | |
10966 return; | 10826 return; |
10967 } | 10827 } |
10968 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10828 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10969 int key; | 10829 int key; |
10970 { | 10830 { |
10971 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 10831 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
10972 if (exceptionState.throwIfNeeded()) | 10832 if (exceptionState.hadException()) |
10973 return; | 10833 return; |
10974 } | 10834 } |
10975 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10835 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10976 ScriptValue result = impl->getForBinding(scriptState, key, exceptionState); | 10836 ScriptValue result = impl->getForBinding(scriptState, key, exceptionState); |
10977 if (exceptionState.hadException()) { | 10837 if (exceptionState.hadException()) { |
10978 exceptionState.throwIfNeeded(); | |
10979 return; | 10838 return; |
10980 } | 10839 } |
10981 v8SetReturnValue(info, result.v8Value()); | 10840 v8SetReturnValue(info, result.v8Value()); |
10982 } | 10841 } |
10983 | 10842 |
10984 static void getMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10843 static void getMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
10985 { | 10844 { |
10986 TestObjectV8Internal::getMethod(info); | 10845 TestObjectV8Internal::getMethod(info); |
10987 } | 10846 } |
10988 | 10847 |
10989 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10848 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10990 { | 10849 { |
10991 ExceptionState exceptionState(ExceptionState::ExecutionContext, "clear", "Te
stObject", info.Holder(), info.GetIsolate()); | 10850 ExceptionState exceptionState(ExceptionState::ExecutionContext, "clear", "Te
stObject", info.Holder(), info.GetIsolate()); |
10992 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10851 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10993 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10852 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
10994 impl->clearForBinding(scriptState, exceptionState); | 10853 impl->clearForBinding(scriptState, exceptionState); |
10995 if (exceptionState.hadException()) { | 10854 if (exceptionState.hadException()) { |
10996 exceptionState.throwIfNeeded(); | |
10997 return; | 10855 return; |
10998 } | 10856 } |
10999 } | 10857 } |
11000 | 10858 |
11001 static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10859 static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
11002 { | 10860 { |
11003 TestObjectV8Internal::clearMethod(info); | 10861 TestObjectV8Internal::clearMethod(info); |
11004 } | 10862 } |
11005 | 10863 |
11006 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10864 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
11007 { | 10865 { |
11008 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T
estObject", info.Holder(), info.GetIsolate()); | 10866 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T
estObject", info.Holder(), info.GetIsolate()); |
11009 if (UNLIKELY(info.Length() < 1)) { | 10867 if (UNLIKELY(info.Length() < 1)) { |
11010 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10868 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
11011 exceptionState.throwIfNeeded(); | |
11012 return; | 10869 return; |
11013 } | 10870 } |
11014 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10871 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11015 int key; | 10872 int key; |
11016 { | 10873 { |
11017 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 10874 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
11018 if (exceptionState.throwIfNeeded()) | 10875 if (exceptionState.hadException()) |
11019 return; | 10876 return; |
11020 } | 10877 } |
11021 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10878 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
11022 bool result = impl->deleteForBinding(scriptState, key, exceptionState); | 10879 bool result = impl->deleteForBinding(scriptState, key, exceptionState); |
11023 if (exceptionState.hadException()) { | 10880 if (exceptionState.hadException()) { |
11024 exceptionState.throwIfNeeded(); | |
11025 return; | 10881 return; |
11026 } | 10882 } |
11027 v8SetReturnValueBool(info, result); | 10883 v8SetReturnValueBool(info, result); |
11028 } | 10884 } |
11029 | 10885 |
11030 static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 10886 static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
11031 { | 10887 { |
11032 TestObjectV8Internal::deleteMethod(info); | 10888 TestObjectV8Internal::deleteMethod(info); |
11033 } | 10889 } |
11034 | 10890 |
11035 static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10891 static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
11036 { | 10892 { |
11037 ExceptionState exceptionState(ExceptionState::ExecutionContext, "set", "Test
Object", info.Holder(), info.GetIsolate()); | 10893 ExceptionState exceptionState(ExceptionState::ExecutionContext, "set", "Test
Object", info.Holder(), info.GetIsolate()); |
11038 if (UNLIKELY(info.Length() < 2)) { | 10894 if (UNLIKELY(info.Length() < 2)) { |
11039 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 10895 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
11040 exceptionState.throwIfNeeded(); | |
11041 return; | 10896 return; |
11042 } | 10897 } |
11043 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10898 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11044 int key; | 10899 int key; |
11045 StringOrDouble value; | 10900 StringOrDouble value; |
11046 { | 10901 { |
11047 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); | 10902 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta
te); |
11048 if (exceptionState.throwIfNeeded()) | 10903 if (exceptionState.hadException()) |
11049 return; | 10904 return; |
11050 V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeCon
versionMode::NotNullable, exceptionState); | 10905 V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeCon
versionMode::NotNullable, exceptionState); |
11051 if (exceptionState.throwIfNeeded()) | 10906 if (exceptionState.hadException()) |
11052 return; | 10907 return; |
11053 } | 10908 } |
11054 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10909 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
11055 TestObject* result = impl->setForBinding(scriptState, key, value, exceptionS
tate); | 10910 TestObject* result = impl->setForBinding(scriptState, key, value, exceptionS
tate); |
11056 if (exceptionState.hadException()) { | 10911 if (exceptionState.hadException()) { |
11057 exceptionState.throwIfNeeded(); | |
11058 return; | 10912 return; |
11059 } | 10913 } |
11060 v8SetReturnValue(info, result); | 10914 v8SetReturnValue(info, result); |
11061 } | 10915 } |
11062 | 10916 |
11063 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 10917 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
11064 { | 10918 { |
11065 TestObjectV8Internal::setMethod(info); | 10919 TestObjectV8Internal::setMethod(info); |
11066 } | 10920 } |
11067 | 10921 |
(...skipping 19 matching lines...) Expand all Loading... |
11087 TestObjectV8Internal::toStringMethod(info); | 10941 TestObjectV8Internal::toStringMethod(info); |
11088 } | 10942 } |
11089 | 10943 |
11090 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10944 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
11091 { | 10945 { |
11092 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestObject", info.Holder(), info.GetIsolate()); | 10946 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestObject", info.Holder(), info.GetIsolate()); |
11093 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10947 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11094 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 10948 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
11095 Iterator* result = impl->iterator(scriptState, exceptionState); | 10949 Iterator* result = impl->iterator(scriptState, exceptionState); |
11096 if (exceptionState.hadException()) { | 10950 if (exceptionState.hadException()) { |
11097 exceptionState.throwIfNeeded(); | |
11098 return; | 10951 return; |
11099 } | 10952 } |
11100 v8SetReturnValue(info, result); | 10953 v8SetReturnValue(info, result); |
11101 } | 10954 } |
11102 | 10955 |
11103 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 10956 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
11104 { | 10957 { |
11105 TestObjectV8Internal::iteratorMethod(info); | 10958 TestObjectV8Internal::iteratorMethod(info); |
11106 } | 10959 } |
11107 | 10960 |
(...skipping 29 matching lines...) Expand all Loading... |
11137 { | 10990 { |
11138 TestObjectV8Internal::indexedPropertySetter(index, v8Value, info); | 10991 TestObjectV8Internal::indexedPropertySetter(index, v8Value, info); |
11139 } | 10992 } |
11140 | 10993 |
11141 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Boolean>& info) | 10994 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Boolean>& info) |
11142 { | 10995 { |
11143 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10996 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11144 ExceptionState exceptionState(ExceptionState::IndexedDeletionContext, "TestO
bject", info.Holder(), info.GetIsolate()); | 10997 ExceptionState exceptionState(ExceptionState::IndexedDeletionContext, "TestO
bject", info.Holder(), info.GetIsolate()); |
11145 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 10998 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
11146 DeleteResult result = impl->anonymousIndexedDeleter(scriptState, index, exce
ptionState); | 10999 DeleteResult result = impl->anonymousIndexedDeleter(scriptState, index, exce
ptionState); |
11147 if (exceptionState.throwIfNeeded()) | 11000 if (exceptionState.hadException()) |
11148 return; | 11001 return; |
11149 if (result != DeleteUnknownProperty) | 11002 if (result != DeleteUnknownProperty) |
11150 return v8SetReturnValueBool(info, result == DeleteSuccess); | 11003 return v8SetReturnValueBool(info, result == DeleteSuccess); |
11151 } | 11004 } |
11152 | 11005 |
11153 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) | 11006 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) |
11154 { | 11007 { |
11155 TestObjectV8Internal::indexedPropertyDeleter(index, info); | 11008 TestObjectV8Internal::indexedPropertyDeleter(index, info); |
11156 } | 11009 } |
11157 | 11010 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11199 } | 11052 } |
11200 | 11053 |
11201 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) | 11054 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) |
11202 { | 11055 { |
11203 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11056 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11204 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 11057 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
11205 v8::String::Utf8Value namedProperty(name); | 11058 v8::String::Utf8Value namedProperty(name); |
11206 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); | 11059 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); |
11207 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11060 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
11208 bool result = impl->namedPropertyQuery(scriptState, propertyName, exceptionS
tate); | 11061 bool result = impl->namedPropertyQuery(scriptState, propertyName, exceptionS
tate); |
11209 if (exceptionState.throwIfNeeded()) | 11062 if (exceptionState.hadException()) |
11210 return; | 11063 return; |
11211 if (!result) | 11064 if (!result) |
11212 return; | 11065 return; |
11213 v8SetReturnValueInt(info, v8::None); | 11066 v8SetReturnValueInt(info, v8::None); |
11214 } | 11067 } |
11215 | 11068 |
11216 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) | 11069 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) |
11217 { | 11070 { |
11218 if (!name->IsString()) | 11071 if (!name->IsString()) |
11219 return; | 11072 return; |
(...skipping 16 matching lines...) Expand all Loading... |
11236 return; | 11089 return; |
11237 TestObjectV8Internal::namedPropertyDeleter(name, info); | 11090 TestObjectV8Internal::namedPropertyDeleter(name, info); |
11238 } | 11091 } |
11239 | 11092 |
11240 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 11093 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
11241 { | 11094 { |
11242 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11095 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11243 Vector<String> names; | 11096 Vector<String> names; |
11244 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObjec
t", info.Holder(), info.GetIsolate()); | 11097 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObjec
t", info.Holder(), info.GetIsolate()); |
11245 impl->namedPropertyEnumerator(names, exceptionState); | 11098 impl->namedPropertyEnumerator(names, exceptionState); |
11246 if (exceptionState.throwIfNeeded()) | 11099 if (exceptionState.hadException()) |
11247 return; | 11100 return; |
11248 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); | 11101 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); |
11249 for (size_t i = 0; i < names.size(); ++i) { | 11102 for (size_t i = 0; i < names.size(); ++i) { |
11250 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) | 11103 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) |
11251 return; | 11104 return; |
11252 } | 11105 } |
11253 v8SetReturnValue(info, v8names); | 11106 v8SetReturnValue(info, v8names); |
11254 } | 11107 } |
11255 | 11108 |
11256 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 11109 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11954 return false; | 11807 return false; |
11955 | 11808 |
11956 ScriptState::Scope scope(scriptState); | 11809 ScriptState::Scope scope(scriptState); |
11957 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11810 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
11958 v8::Local<v8::Value> *argv = 0; | 11811 v8::Local<v8::Value> *argv = 0; |
11959 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); | 11812 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); |
11960 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "shortMethodImplementedInPrivateScript"
, holder, 0, argv); | 11813 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "shortMethodImplementedInPrivateScript"
, holder, 0, argv); |
11961 if (v8Value.IsEmpty()) | 11814 if (v8Value.IsEmpty()) |
11962 return false; | 11815 return false; |
11963 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); | 11816 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); |
11964 if (exceptionState.throwIfNeeded()) | 11817 if (exceptionState.hadException()) |
11965 return false; | 11818 return false; |
11966 *result = cppValue; | 11819 *result = cppValue; |
11967 RELEASE_ASSERT(!exceptionState.hadException()); | 11820 RELEASE_ASSERT(!exceptionState.hadException()); |
11968 return true; | 11821 return true; |
11969 } | 11822 } |
11970 | 11823 |
11971 bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva
teScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result
) | 11824 bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva
teScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result
) |
11972 { | 11825 { |
11973 if (!frame) | 11826 if (!frame) |
11974 return false; | 11827 return false; |
11975 v8::HandleScope handleScope(toIsolate(frame)); | 11828 v8::HandleScope handleScope(toIsolate(frame)); |
11976 ScriptForbiddenScope::AllowUserAgentScript script; | 11829 ScriptForbiddenScope::AllowUserAgentScript script; |
11977 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 11830 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
11978 if (!scriptState) | 11831 if (!scriptState) |
11979 return false; | 11832 return false; |
11980 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 11833 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
11981 if (!scriptStateInUserScript) | 11834 if (!scriptStateInUserScript) |
11982 return false; | 11835 return false; |
11983 | 11836 |
11984 ScriptState::Scope scope(scriptState); | 11837 ScriptState::Scope scope(scriptState); |
11985 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11838 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
11986 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | 11839 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); |
11987 v8::Local<v8::Value> argv[] = { valueHandle }; | 11840 v8::Local<v8::Value> argv[] = { valueHandle }; |
11988 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); | 11841 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); |
11989 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "shortMethodWithShortArgumentImplemente
dInPrivateScript", holder, 1, argv); | 11842 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "shortMethodWithShortArgumentImplemente
dInPrivateScript", holder, 1, argv); |
11990 if (v8Value.IsEmpty()) | 11843 if (v8Value.IsEmpty()) |
11991 return false; | 11844 return false; |
11992 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); | 11845 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); |
11993 if (exceptionState.throwIfNeeded()) | 11846 if (exceptionState.hadException()) |
11994 return false; | 11847 return false; |
11995 *result = cppValue; | 11848 *result = cppValue; |
11996 RELEASE_ASSERT(!exceptionState.hadException()); | 11849 RELEASE_ASSERT(!exceptionState.hadException()); |
11997 return true; | 11850 return true; |
11998 } | 11851 } |
11999 | 11852 |
12000 bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String
* result) | 11853 bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String
* result) |
12001 { | 11854 { |
12002 if (!frame) | 11855 if (!frame) |
12003 return false; | 11856 return false; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12100 ScriptState::Scope scope(scriptState); | 11953 ScriptState::Scope scope(scriptState); |
12101 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11954 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
12102 v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(),
value1); | 11955 v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(),
value1); |
12103 v8::Local<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate(),
value2); | 11956 v8::Local<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate(),
value2); |
12104 v8::Local<v8::Value> argv[] = { value1Handle, value2Handle }; | 11957 v8::Local<v8::Value> argv[] = { value1Handle, value2Handle }; |
12105 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | 11958 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); |
12106 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "methodForPrivateScriptOnly", holder, 2
, argv); | 11959 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestObject", "methodForPrivateScriptOnly", holder, 2
, argv); |
12107 if (v8Value.IsEmpty()) | 11960 if (v8Value.IsEmpty()) |
12108 return false; | 11961 return false; |
12109 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); | 11962 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); |
12110 if (exceptionState.throwIfNeeded()) | 11963 if (exceptionState.hadException()) |
12111 return false; | 11964 return false; |
12112 *result = cppValue; | 11965 *result = cppValue; |
12113 RELEASE_ASSERT(!exceptionState.hadException()); | 11966 RELEASE_ASSERT(!exceptionState.hadException()); |
12114 return true; | 11967 return true; |
12115 } | 11968 } |
12116 | 11969 |
12117 bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra
me* frame, TestObject* holderImpl, int* result) | 11970 bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra
me* frame, TestObject* holderImpl, int* result) |
12118 { | 11971 { |
12119 if (!frame) | 11972 if (!frame) |
12120 return false; | 11973 return false; |
12121 v8::HandleScope handleScope(toIsolate(frame)); | 11974 v8::HandleScope handleScope(toIsolate(frame)); |
12122 ScriptForbiddenScope::AllowUserAgentScript script; | 11975 ScriptForbiddenScope::AllowUserAgentScript script; |
12123 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 11976 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
12124 if (!scriptState) | 11977 if (!scriptState) |
12125 return false; | 11978 return false; |
12126 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 11979 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
12127 if (!scriptStateInUserScript) | 11980 if (!scriptStateInUserScript) |
12128 return false; | 11981 return false; |
12129 | 11982 |
12130 ScriptState::Scope scope(scriptState); | 11983 ScriptState::Scope scope(scriptState); |
12131 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11984 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
12132 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); | 11985 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); |
12133 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestObject", "readonlyShortAttribute", hold
er); | 11986 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestObject", "readonlyShortAttribute", hold
er); |
12134 if (v8Value.IsEmpty()) | 11987 if (v8Value.IsEmpty()) |
12135 return false; | 11988 return false; |
12136 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); | 11989 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); |
12137 if (exceptionState.throwIfNeeded()) | 11990 if (exceptionState.hadException()) |
12138 return false; | 11991 return false; |
12139 RELEASE_ASSERT(!exceptionState.hadException()); | 11992 RELEASE_ASSERT(!exceptionState.hadException()); |
12140 *result = cppValue; | 11993 *result = cppValue; |
12141 return true; | 11994 return true; |
12142 } | 11995 } |
12143 | 11996 |
12144 bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* fram
e, TestObject* holderImpl, int* result) | 11997 bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* fram
e, TestObject* holderImpl, int* result) |
12145 { | 11998 { |
12146 if (!frame) | 11999 if (!frame) |
12147 return false; | 12000 return false; |
12148 v8::HandleScope handleScope(toIsolate(frame)); | 12001 v8::HandleScope handleScope(toIsolate(frame)); |
12149 ScriptForbiddenScope::AllowUserAgentScript script; | 12002 ScriptForbiddenScope::AllowUserAgentScript script; |
12150 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); | 12003 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri
vateScriptIsolatedWorld()); |
12151 if (!scriptState) | 12004 if (!scriptState) |
12152 return false; | 12005 return false; |
12153 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 12006 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
12154 if (!scriptStateInUserScript) | 12007 if (!scriptStateInUserScript) |
12155 return false; | 12008 return false; |
12156 | 12009 |
12157 ScriptState::Scope scope(scriptState); | 12010 ScriptState::Scope scope(scriptState); |
12158 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12011 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
12159 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 12012 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
12160 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestObject", "shortAttribute", holder); | 12013 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestObject", "shortAttribute", holder); |
12161 if (v8Value.IsEmpty()) | 12014 if (v8Value.IsEmpty()) |
12162 return false; | 12015 return false; |
12163 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); | 12016 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex
ceptionState); |
12164 if (exceptionState.throwIfNeeded()) | 12017 if (exceptionState.hadException()) |
12165 return false; | 12018 return false; |
12166 RELEASE_ASSERT(!exceptionState.hadException()); | 12019 RELEASE_ASSERT(!exceptionState.hadException()); |
12167 *result = cppValue; | 12020 *result = cppValue; |
12168 return true; | 12021 return true; |
12169 } | 12022 } |
12170 | 12023 |
12171 bool V8TestObject::PrivateScript::shortAttributeAttributeSetter(LocalFrame* fram
e, TestObject* holderImpl, int cppValue) | 12024 bool V8TestObject::PrivateScript::shortAttributeAttributeSetter(LocalFrame* fram
e, TestObject* holderImpl, int cppValue) |
12172 { | 12025 { |
12173 if (!frame) | 12026 if (!frame) |
12174 return false; | 12027 return false; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12363 if (!scriptStateInUserScript) | 12216 if (!scriptStateInUserScript) |
12364 return false; | 12217 return false; |
12365 | 12218 |
12366 ScriptState::Scope scope(scriptState); | 12219 ScriptState::Scope scope(scriptState); |
12367 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12220 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
12368 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 12221 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
12369 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 12222 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
12370 } | 12223 } |
12371 | 12224 |
12372 } // namespace blink | 12225 } // namespace blink |
OLD | NEW |