OLD | NEW |
1 {% extends 'interface_base.cpp.tmpl' %} | 1 {% extends 'interface_base.cpp.tmpl' %} |
2 | 2 |
3 {% set has_prepare_prototype_and_interface_object = | 3 {% set has_prepare_prototype_and_interface_object = |
4 unscopables or has_conditional_attributes_on_prototype or | 4 unscopables or has_conditional_attributes_on_prototype or |
5 methods | conditionally_exposed(is_partial) %} | 5 methods | conditionally_exposed(is_partial) %} |
6 {% set prepare_prototype_and_interface_object_func = | 6 {% set prepare_prototype_and_interface_object_func = |
7 '%s::preparePrototypeAndInterfaceObject' % v8_class | 7 '%s::preparePrototypeAndInterfaceObject' % v8_class |
8 if has_prepare_prototype_and_interface_object | 8 if has_prepare_prototype_and_interface_object |
9 else 'nullptr' %} | 9 else 'nullptr' %} |
10 | 10 |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 } | 641 } |
642 {% endif %} | 642 {% endif %} |
643 } | 643 } |
644 | 644 |
645 {% endif %} | 645 {% endif %} |
646 {% endblock %} | 646 {% endblock %} |
647 | 647 |
648 | 648 |
649 {##############################################################################} | 649 {##############################################################################} |
650 {% block constructor_callback %} | 650 {% block constructor_callback %} |
651 {% if constructors or has_custom_constructor or has_event_constructor %} | 651 {% if constructors or has_custom_constructor or has_event_constructor or has_htm
l_constructor %} |
652 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 652 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
653 { | 653 { |
654 {% if measure_as %} | 654 {% if measure_as %} |
655 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); | 655 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); |
656 {% endif %} | 656 {% endif %} |
657 if (!info.IsConstructCall()) { | 657 if (!info.IsConstructCall()) { |
658 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); | 658 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); |
659 return; | 659 return; |
660 } | 660 } |
661 | 661 |
662 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 662 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
663 v8SetReturnValue(info, info.Holder()); | 663 v8SetReturnValue(info, info.Holder()); |
664 return; | 664 return; |
665 } | 665 } |
666 | 666 |
667 {% if has_custom_constructor %} | 667 {% if has_custom_constructor %} |
668 {{v8_class}}::constructorCustom(info); | 668 {{v8_class}}::constructorCustom(info); |
| 669 {% elif has_html_constructor %} |
| 670 {{v8_class}}::HTMLConstructor(info); |
669 {% else %} | 671 {% else %} |
670 {{cpp_class}}V8Internal::constructor(info); | 672 {{cpp_class}}V8Internal::constructor(info); |
671 {% endif %} | 673 {% endif %} |
672 } | 674 } |
673 | 675 |
674 {% endif %} | 676 {% endif %} |
675 {% endblock %} | 677 {% endblock %} |
676 | 678 |
677 | 679 |
678 {##############################################################################} | 680 {##############################################################################} |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 | 992 |
991 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 993 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
992 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 994 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
993 { | 995 { |
994 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 996 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
995 } | 997 } |
996 | 998 |
997 {% endfor %} | 999 {% endfor %} |
998 {% endif %} | 1000 {% endif %} |
999 {% endblock %} | 1001 {% endblock %} |
OLD | NEW |