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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 {##############################################################################} | 651 {##############################################################################} |
652 {% block constructor_callback %} | 652 {% block constructor_callback %} |
653 {% if constructors or has_custom_constructor or has_event_constructor %} | 653 {% if constructors or has_custom_constructor or has_event_constructor %} |
654 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 654 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
655 { | 655 { |
656 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 656 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
657 {% if measure_as %} | 657 {% if measure_as %} |
658 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as}}); | 658 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{measure_as}}); |
659 {% endif %} | 659 {% endif %} |
660 if (!info.IsConstructCall()) { | 660 if (!info.IsConstructCall()) { |
661 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("{{interface_name}}"), info.GetIsolate()); | 661 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("{{interface_name}}")); |
662 return; | 662 return; |
663 } | 663 } |
664 | 664 |
665 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 665 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
666 v8SetReturnValue(info, info.Holder()); | 666 v8SetReturnValue(info, info.Holder()); |
667 return; | 667 return; |
668 } | 668 } |
669 | 669 |
670 {% if has_custom_constructor %} | 670 {% if has_custom_constructor %} |
671 {{v8_class}}::constructorCustom(info); | 671 {{v8_class}}::constructorCustom(info); |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 } | 984 } |
985 | 985 |
986 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 986 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
987 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 987 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
988 { | 988 { |
989 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 989 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
990 } | 990 } |
991 {% endfor %} | 991 {% endfor %} |
992 {% endif %} | 992 {% endif %} |
993 {% endblock %} | 993 {% endblock %} |
OLD | NEW |