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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 {% endblock %} | 665 {% endblock %} |
666 | 666 |
667 | 667 |
668 {##############################################################################} | 668 {##############################################################################} |
669 {% block constructor_callback %} | 669 {% block constructor_callback %} |
670 {% if constructors or has_custom_constructor or has_event_constructor %} | 670 {% if constructors or has_custom_constructor or has_event_constructor %} |
671 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 671 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
672 { | 672 { |
673 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 673 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
674 {% if measure_as %} | 674 {% if measure_as %} |
675 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as}}); | 675 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); |
676 {% endif %} | 676 {% endif %} |
677 if (!info.IsConstructCall()) { | 677 if (!info.IsConstructCall()) { |
678 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); | 678 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); |
679 return; | 679 return; |
680 } | 680 } |
681 | 681 |
682 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 682 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
683 v8SetReturnValue(info, info.Holder()); | 683 v8SetReturnValue(info, info.Holder()); |
684 return; | 684 return; |
685 } | 685 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 } | 979 } |
980 | 980 |
981 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 981 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
982 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 982 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
983 { | 983 { |
984 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 984 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
985 } | 985 } |
986 {% endfor %} | 986 {% endfor %} |
987 {% endif %} | 987 {% endif %} |
988 {% endblock %} | 988 {% endblock %} |
OLD | NEW |