OLD | NEW |
1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% block indexed_property_getter %} | 5 {% block indexed_property_getter %} |
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
7 {% set getter = indexed_property_getter %} | 7 {% set getter = indexed_property_getter %} |
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
9 { | 9 { |
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 {% endblock %} | 671 {% endblock %} |
672 | 672 |
673 | 673 |
674 {##############################################################################} | 674 {##############################################################################} |
675 {% block constructor_callback %} | 675 {% block constructor_callback %} |
676 {% if constructors or has_custom_constructor or has_event_constructor %} | 676 {% if constructors or has_custom_constructor or has_event_constructor %} |
677 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 677 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
678 { | 678 { |
679 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 679 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
680 {% if measure_as %} | 680 {% if measure_as %} |
681 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as}}); | 681 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); |
682 {% endif %} | 682 {% endif %} |
683 if (!info.IsConstructCall()) { | 683 if (!info.IsConstructCall()) { |
684 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); | 684 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); |
685 return; | 685 return; |
686 } | 686 } |
687 | 687 |
688 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 688 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
689 v8SetReturnValue(info, info.Holder()); | 689 v8SetReturnValue(info, info.Holder()); |
690 return; | 690 return; |
691 } | 691 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 } | 985 } |
986 | 986 |
987 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 987 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
988 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 988 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
989 { | 989 { |
990 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 990 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
991 } | 991 } |
992 {% endfor %} | 992 {% endfor %} |
993 {% endif %} | 993 {% endif %} |
994 {% endblock %} | 994 {% endblock %} |
OLD | NEW |