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 // clang-format off | 7 // clang-format off |
8 #include "V8TestInterface5.h" | 8 #include "V8TestInterface5.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs
olate(), info[0]); | 389 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs
olate(), info[0]); |
390 if (!testInterfaceEmptyArg) { | 390 if (!testInterfaceEmptyArg) { |
391 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1
is not of type 'TestInterfaceEmpty'.")); | 391 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1
is not of type 'TestInterfaceEmpty'.")); |
392 | 392 |
393 return; | 393 return; |
394 } | 394 } |
395 | 395 |
396 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | 396 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
397 } | 397 } |
398 | 398 |
399 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 399 void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
400 { | 400 { |
401 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); | 401 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); |
402 } | 402 } |
403 | 403 |
404 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 404 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
405 { | 405 { |
406 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodDoubleArgFloatArg"); | 406 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodDoubleArgFloatArg"); |
407 | 407 |
408 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 408 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
409 | 409 |
410 if (UNLIKELY(info.Length() < 2)) { | 410 if (UNLIKELY(info.Length() < 2)) { |
411 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 411 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
412 return; | 412 return; |
413 } | 413 } |
414 | 414 |
415 double doubleArg; | 415 double doubleArg; |
416 float floatArg; | 416 float floatArg; |
417 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); | 417 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
418 if (exceptionState.hadException()) | 418 if (exceptionState.hadException()) |
419 return; | 419 return; |
420 | 420 |
421 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState); | 421 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState); |
422 if (exceptionState.hadException()) | 422 if (exceptionState.hadException()) |
423 return; | 423 return; |
424 | 424 |
425 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 425 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
426 } | 426 } |
427 | 427 |
428 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 428 void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
429 { | 429 { |
430 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); | 430 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); |
431 } | 431 } |
432 | 432 |
433 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 433 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
434 { | 434 { |
435 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); | 435 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); |
436 | 436 |
437 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 437 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
438 | 438 |
439 if (UNLIKELY(info.Length() < 2)) { | 439 if (UNLIKELY(info.Length() < 2)) { |
440 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 440 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
441 return; | 441 return; |
442 } | 442 } |
443 | 443 |
444 double unrestrictedDoubleArg; | 444 double unrestrictedDoubleArg; |
445 float unrestrictedFloatArg; | 445 float unrestrictedFloatArg; |
446 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState)
; | 446 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState)
; |
447 if (exceptionState.hadException()) | 447 if (exceptionState.hadException()) |
448 return; | 448 return; |
449 | 449 |
450 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState); | 450 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState); |
451 if (exceptionState.hadException()) | 451 if (exceptionState.hadException()) |
452 return; | 452 return; |
453 | 453 |
454 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 454 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
455 } | 455 } |
456 | 456 |
457 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 457 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
458 { | 458 { |
459 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); | 459 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); |
460 } | 460 } |
461 | 461 |
462 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 462 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
463 { | 463 { |
464 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 464 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
465 | 465 |
466 impl->voidMethod(); | 466 impl->voidMethod(); |
467 } | 467 } |
468 | 468 |
469 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 469 void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
470 { | 470 { |
471 TestInterface5ImplementationV8Internal::voidMethodMethod(info); | 471 TestInterface5ImplementationV8Internal::voidMethodMethod(info); |
472 } | 472 } |
473 | 473 |
474 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 474 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
475 { | 475 { |
476 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 476 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
477 | 477 |
478 impl->voidMethod(); | 478 impl->voidMethod(); |
479 } | 479 } |
480 | 480 |
481 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) | 481 void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
482 { | 482 { |
483 TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info); | 483 TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info); |
484 } | 484 } |
485 | 485 |
486 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 486 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
487 { | 487 { |
488 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 488 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
489 | 489 |
490 impl->alwaysExposedMethod(); | 490 impl->alwaysExposedMethod(); |
491 } | 491 } |
492 | 492 |
493 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 493 void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
494 { | 494 { |
495 TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info); | 495 TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info); |
496 } | 496 } |
497 | 497 |
498 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 498 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
499 { | 499 { |
500 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 500 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
501 | 501 |
502 impl->workerExposedMethod(); | 502 impl->workerExposedMethod(); |
503 } | 503 } |
504 | 504 |
505 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 505 void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
506 { | 506 { |
507 TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info); | 507 TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info); |
508 } | 508 } |
509 | 509 |
510 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 510 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
511 { | 511 { |
512 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 512 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
513 | 513 |
514 impl->windowExposedMethod(); | 514 impl->windowExposedMethod(); |
515 } | 515 } |
516 | 516 |
517 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 517 void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
518 { | 518 { |
519 TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info); | 519 TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info); |
520 } | 520 } |
521 | 521 |
522 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 522 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
523 { | 523 { |
524 TestInterface5Implementation::alwaysExposedStaticMethod(); | 524 TestInterface5Implementation::alwaysExposedStaticMethod(); |
525 } | 525 } |
526 | 526 |
527 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 527 void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
528 { | 528 { |
529 TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethod(info
); | 529 TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethod(info
); |
530 } | 530 } |
531 | 531 |
532 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 532 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
533 { | 533 { |
534 TestInterface5Implementation::workerExposedStaticMethod(); | 534 TestInterface5Implementation::workerExposedStaticMethod(); |
535 } | 535 } |
536 | 536 |
537 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 537 void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
538 { | 538 { |
539 TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethod(info
); | 539 TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethod(info
); |
540 } | 540 } |
541 | 541 |
542 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 542 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
543 { | 543 { |
544 TestInterface5Implementation::windowExposedStaticMethod(); | 544 TestInterface5Implementation::windowExposedStaticMethod(); |
545 } | 545 } |
546 | 546 |
547 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 547 void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
548 { | 548 { |
549 TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info
); | 549 TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info
); |
550 } | 550 } |
551 | 551 |
552 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 552 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
553 { | 553 { |
554 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 554 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
555 | 555 |
556 impl->windowAndServiceWorkerExposedMethod(); | 556 impl->windowAndServiceWorkerExposedMethod(); |
557 } | 557 } |
558 | 558 |
559 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 559 void windowAndServiceWorkerExposedMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
560 { | 560 { |
561 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM
ethod(info); | 561 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM
ethod(info); |
562 } | 562 } |
563 | 563 |
564 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 564 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
565 { | 565 { |
566 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodBooleanOrDOMStringArg"); | 566 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodBooleanOrDOMStringArg"); |
567 | 567 |
568 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 568 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
569 | 569 |
570 if (UNLIKELY(info.Length() < 1)) { | 570 if (UNLIKELY(info.Length() < 1)) { |
571 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 571 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
572 return; | 572 return; |
573 } | 573 } |
574 | 574 |
575 BooleanOrString arg; | 575 BooleanOrString arg; |
576 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversi
onMode::NotNullable, exceptionState); | 576 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversi
onMode::NotNullable, exceptionState); |
577 if (exceptionState.hadException()) | 577 if (exceptionState.hadException()) |
578 return; | 578 return; |
579 | 579 |
580 impl->voidMethodBooleanOrDOMStringArg(arg); | 580 impl->voidMethodBooleanOrDOMStringArg(arg); |
581 } | 581 } |
582 | 582 |
583 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 583 void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
584 { | 584 { |
585 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); | 585 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); |
586 } | 586 } |
587 | 587 |
588 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 588 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
589 { | 589 { |
590 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodDoubleOrDOMStringArg"); | 590 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodDoubleOrDOMStringArg"); |
591 | 591 |
592 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 592 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
593 | 593 |
594 if (UNLIKELY(info.Length() < 1)) { | 594 if (UNLIKELY(info.Length() < 1)) { |
595 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 595 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
596 return; | 596 return; |
597 } | 597 } |
598 | 598 |
599 DoubleOrString arg; | 599 DoubleOrString arg; |
600 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversio
nMode::NotNullable, exceptionState); | 600 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversio
nMode::NotNullable, exceptionState); |
601 if (exceptionState.hadException()) | 601 if (exceptionState.hadException()) |
602 return; | 602 return; |
603 | 603 |
604 impl->voidMethodDoubleOrDOMStringArg(arg); | 604 impl->voidMethodDoubleOrDOMStringArg(arg); |
605 } | 605 } |
606 | 606 |
607 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 607 void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
608 { | 608 { |
609 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); | 609 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); |
610 } | 610 } |
611 | 611 |
612 static void voidMethodVoidExperimentalCallbackFunctionMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 612 static void voidMethodVoidExperimentalCallbackFunctionMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
613 { | 613 { |
614 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 614 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
615 | 615 |
616 if (UNLIKELY(info.Length() < 1)) { | 616 if (UNLIKELY(info.Length() < 1)) { |
617 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", E
xceptionMessages::notEnoughArguments(1, info.Length()))); | 617 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", E
xceptionMessages::notEnoughArguments(1, info.Length()))); |
618 return; | 618 return; |
619 } | 619 } |
620 | 620 |
621 VoidExperimentalCallbackFunction* arg; | 621 VoidExperimentalCallbackFunction* arg; |
622 arg = V8VoidExperimentalCallbackFunction::toImplWithTypeCheck(info.GetIsolat
e(), info[0]); | 622 arg = V8VoidExperimentalCallbackFunction::toImplWithTypeCheck(info.GetIsolat
e(), info[0]); |
623 if (!arg) { | 623 if (!arg) { |
624 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", "
parameter 1 is not of type 'VoidExperimentalCallbackFunction'.")); | 624 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidExperimentalCallbackFunction", "TestInterface5", "
parameter 1 is not of type 'VoidExperimentalCallbackFunction'.")); |
625 | 625 |
626 return; | 626 return; |
627 } | 627 } |
628 | 628 |
629 impl->voidMethodVoidExperimentalCallbackFunction(arg); | 629 impl->voidMethodVoidExperimentalCallbackFunction(arg); |
630 } | 630 } |
631 | 631 |
632 static void voidMethodVoidExperimentalCallbackFunctionMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 632 void voidMethodVoidExperimentalCallbackFunctionMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
633 { | 633 { |
634 TestInterface5ImplementationV8Internal::voidMethodVoidExperimentalCallbackFu
nctionMethod(info); | 634 TestInterface5ImplementationV8Internal::voidMethodVoidExperimentalCallbackFu
nctionMethod(info); |
635 } | 635 } |
636 | 636 |
637 static void voidMethodVoidCallbackFunctionModulesArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 637 static void voidMethodVoidCallbackFunctionModulesArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
638 { | 638 { |
639 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 639 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
640 | 640 |
641 if (UNLIKELY(info.Length() < 1)) { | 641 if (UNLIKELY(info.Length() < 1)) { |
642 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", Exc
eptionMessages::notEnoughArguments(1, info.Length()))); | 642 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", Exc
eptionMessages::notEnoughArguments(1, info.Length()))); |
643 return; | 643 return; |
644 } | 644 } |
645 | 645 |
646 VoidCallbackFunctionModules* arg; | 646 VoidCallbackFunctionModules* arg; |
647 if (!info[0]->IsFunction()) { | 647 if (!info[0]->IsFunction()) { |
648 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "Th
e callback provided as parameter 1 is not a function.")); | 648 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "Th
e callback provided as parameter 1 is not a function.")); |
649 | 649 |
650 return; | 650 return; |
651 } | 651 } |
652 arg = VoidCallbackFunctionModules::create(info.GetIsolate(), v8::Local<v8::F
unction>::Cast(info[0])); | 652 arg = VoidCallbackFunctionModules::create(info.GetIsolate(), v8::Local<v8::F
unction>::Cast(info[0])); |
653 | 653 |
654 impl->voidMethodVoidCallbackFunctionModulesArg(arg); | 654 impl->voidMethodVoidCallbackFunctionModulesArg(arg); |
655 } | 655 } |
656 | 656 |
657 static void voidMethodVoidCallbackFunctionModulesArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 657 void voidMethodVoidCallbackFunctionModulesArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
658 { | 658 { |
659 TestInterface5ImplementationV8Internal::voidMethodVoidCallbackFunctionModule
sArgMethod(info); | 659 TestInterface5ImplementationV8Internal::voidMethodVoidCallbackFunctionModule
sArgMethod(info); |
660 } | 660 } |
661 | 661 |
662 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 662 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
663 { | 663 { |
664 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "keys"); | 664 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "keys"); |
665 | 665 |
666 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 666 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
667 | 667 |
668 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 668 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
669 | 669 |
670 Iterator* result = impl->keysForBinding(scriptState, exceptionState); | 670 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
671 if (exceptionState.hadException()) { | 671 if (exceptionState.hadException()) { |
672 return; | 672 return; |
673 } | 673 } |
674 v8SetReturnValue(info, result); | 674 v8SetReturnValue(info, result); |
675 } | 675 } |
676 | 676 |
677 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 677 void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
678 { | 678 { |
679 TestInterface5ImplementationV8Internal::keysMethod(info); | 679 TestInterface5ImplementationV8Internal::keysMethod(info); |
680 } | 680 } |
681 | 681 |
682 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 682 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
683 { | 683 { |
684 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "values"); | 684 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "values"); |
685 | 685 |
686 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 686 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
687 | 687 |
688 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 688 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
689 | 689 |
690 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | 690 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
691 if (exceptionState.hadException()) { | 691 if (exceptionState.hadException()) { |
692 return; | 692 return; |
693 } | 693 } |
694 v8SetReturnValue(info, result); | 694 v8SetReturnValue(info, result); |
695 } | 695 } |
696 | 696 |
697 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 697 void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
698 { | 698 { |
699 TestInterface5ImplementationV8Internal::valuesMethod(info); | 699 TestInterface5ImplementationV8Internal::valuesMethod(info); |
700 } | 700 } |
701 | 701 |
702 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 702 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
703 { | 703 { |
704 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "entries"); | 704 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "entries"); |
705 | 705 |
706 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 706 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
707 | 707 |
708 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 708 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
709 | 709 |
710 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | 710 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
711 if (exceptionState.hadException()) { | 711 if (exceptionState.hadException()) { |
712 return; | 712 return; |
713 } | 713 } |
714 v8SetReturnValue(info, result); | 714 v8SetReturnValue(info, result); |
715 } | 715 } |
716 | 716 |
717 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 717 void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
718 { | 718 { |
719 TestInterface5ImplementationV8Internal::entriesMethod(info); | 719 TestInterface5ImplementationV8Internal::entriesMethod(info); |
720 } | 720 } |
721 | 721 |
722 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 722 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
723 { | 723 { |
724 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "forEach"); | 724 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "forEach"); |
725 | 725 |
726 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 726 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
727 | 727 |
(...skipping 14 matching lines...) Expand all Loading... |
742 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); | 742 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
743 | 743 |
744 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 744 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
745 | 745 |
746 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); | 746 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); |
747 if (exceptionState.hadException()) { | 747 if (exceptionState.hadException()) { |
748 return; | 748 return; |
749 } | 749 } |
750 } | 750 } |
751 | 751 |
752 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 752 void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
753 { | 753 { |
754 TestInterface5ImplementationV8Internal::forEachMethod(info); | 754 TestInterface5ImplementationV8Internal::forEachMethod(info); |
755 } | 755 } |
756 | 756 |
757 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 757 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
758 { | 758 { |
759 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 759 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
760 | 760 |
761 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 761 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
762 } | 762 } |
763 | 763 |
764 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 764 void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
765 { | 765 { |
766 TestInterface5ImplementationV8Internal::toStringMethod(info); | 766 TestInterface5ImplementationV8Internal::toStringMethod(info); |
767 } | 767 } |
768 | 768 |
769 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 769 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
770 { | 770 { |
771 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "iterator"); | 771 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "iterator"); |
772 | 772 |
773 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 773 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
774 | 774 |
775 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 775 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
776 | 776 |
777 Iterator* result = impl->iterator(scriptState, exceptionState); | 777 Iterator* result = impl->iterator(scriptState, exceptionState); |
778 if (exceptionState.hadException()) { | 778 if (exceptionState.hadException()) { |
779 return; | 779 return; |
780 } | 780 } |
781 v8SetReturnValue(info, result); | 781 v8SetReturnValue(info, result); |
782 } | 782 } |
783 | 783 |
784 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 784 void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
785 { | 785 { |
786 TestInterface5ImplementationV8Internal::iteratorMethod(info); | 786 TestInterface5ImplementationV8Internal::iteratorMethod(info); |
787 } | 787 } |
788 | 788 |
789 static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCall
backInfo<v8::Value>& info) | 789 static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCall
backInfo<v8::Value>& info) |
790 { | 790 { |
791 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 791 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
792 String result = impl->anonymousNamedGetter(name); | 792 String result = impl->anonymousNamedGetter(name); |
793 if (result.isNull()) | 793 if (result.isNull()) |
794 return; | 794 return; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 1078 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; |
1079 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); | 1079 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); |
1080 } | 1080 } |
1081 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { | 1081 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { |
1082 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; | 1082 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; |
1083 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); | 1083 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); |
1084 } | 1084 } |
1085 } | 1085 } |
1086 | 1086 |
1087 } // namespace blink | 1087 } // namespace blink |
OLD | NEW |