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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 '%sV8Internal::indexedPropertySetterCallback' % cpp_class | 718 '%sV8Internal::indexedPropertySetterCallback' % cpp_class |
719 if indexed_property_setter or named_property_setter else '0' %} | 719 if indexed_property_setter or named_property_setter else '0' %} |
720 {% set indexed_property_query_callback = '0' %}{# Unused #} | 720 {% set indexed_property_query_callback = '0' %}{# Unused #} |
721 {% set indexed_property_deleter_callback = | 721 {% set indexed_property_deleter_callback = |
722 '%sV8Internal::indexedPropertyDeleterCallback' % cpp_class | 722 '%sV8Internal::indexedPropertyDeleterCallback' % cpp_class |
723 if indexed_property_deleter or named_property_deleter else '0' %} | 723 if indexed_property_deleter or named_property_deleter else '0' %} |
724 {% set indexed_property_enumerator_callback = | 724 {% set indexed_property_enumerator_callback = |
725 'indexedPropertyEnumerator<%s>' % cpp_class | 725 'indexedPropertyEnumerator<%s>' % cpp_class |
726 if indexed_property_getter.is_enumerable else '0' %} | 726 if indexed_property_getter.is_enumerable else '0' %} |
727 {% set property_handler_flags = | 727 {% set property_handler_flags = |
728 'v8::PropertyHandlerFlags::kAllCanRead' | 728 'v8::PropertyHandlerFlags::kNone' %} |
729 if indexed_property_getter.do_not_check_security | |
730 else 'v8::PropertyHandlerFlags::kNone' %} | |
731 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig({{indexed_p
roperty_getter_callback}}, {{indexed_property_setter_callback}}, {{indexed_prope
rty_query_callback}}, {{indexed_property_deleter_callback}}, {{indexed_property_
enumerator_callback}}, v8::Local<v8::Value>(), {{property_handler_flags}}); | 729 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig({{indexed_p
roperty_getter_callback}}, {{indexed_property_setter_callback}}, {{indexed_prope
rty_query_callback}}, {{indexed_property_deleter_callback}}, {{indexed_property_
enumerator_callback}}, v8::Local<v8::Value>(), {{property_handler_flags}}); |
732 {{target}}->SetHandler(indexedPropertyHandlerConfig); | 730 {{target}}->SetHandler(indexedPropertyHandlerConfig); |
733 {%- endmacro %} | 731 {%- endmacro %} |
734 | 732 |
735 | 733 |
736 {##############################################################################} | 734 {##############################################################################} |
737 {% macro install_named_property_handler(target) %} | 735 {% macro install_named_property_handler(target) %} |
738 {% set named_property_getter_callback = | 736 {% set named_property_getter_callback = |
739 '%sV8Internal::namedPropertyGetterCallback' % cpp_class %} | 737 '%sV8Internal::namedPropertyGetterCallback' % cpp_class %} |
740 {% set named_property_setter_callback = | 738 {% set named_property_setter_callback = |
741 '%sV8Internal::namedPropertySetterCallback' % cpp_class | 739 '%sV8Internal::namedPropertySetterCallback' % cpp_class |
742 if named_property_setter else '0' %} | 740 if named_property_setter else '0' %} |
743 {% set named_property_query_callback = | 741 {% set named_property_query_callback = |
744 '%sV8Internal::namedPropertyQueryCallback' % cpp_class | 742 '%sV8Internal::namedPropertyQueryCallback' % cpp_class |
745 if named_property_getter.is_enumerable else '0' %} | 743 if named_property_getter.is_enumerable else '0' %} |
746 {% set named_property_deleter_callback = | 744 {% set named_property_deleter_callback = |
747 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class | 745 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class |
748 if named_property_deleter else '0' %} | 746 if named_property_deleter else '0' %} |
749 {% set named_property_enumerator_callback = | 747 {% set named_property_enumerator_callback = |
750 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class | 748 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class |
751 if named_property_getter.is_enumerable else '0' %} | 749 if named_property_getter.is_enumerable else '0' %} |
752 {% set property_handler_flags_list = | 750 {% set property_handler_flags_list = |
753 ['int(v8::PropertyHandlerFlags::kOnlyInterceptStrings)'] %} | 751 ['int(v8::PropertyHandlerFlags::kOnlyInterceptStrings)'] %} |
754 {% if named_property_getter.do_not_check_security %} | |
755 {% set property_handler_flags_list = | |
756 property_handler_flags_list + ['int(v8::PropertyHandlerFlags::kAllCanRead
)'] %} | |
757 {% endif %} | |
758 {% if not is_override_builtins %} | 752 {% if not is_override_builtins %} |
759 {% set property_handler_flags_list = | 753 {% set property_handler_flags_list = |
760 property_handler_flags_list + ['int(v8::PropertyHandlerFlags::kNonMasking
)'] %} | 754 property_handler_flags_list + ['int(v8::PropertyHandlerFlags::kNonMasking
)'] %} |
761 {% endif %} | 755 {% endif %} |
762 {% set property_handler_flags = | 756 {% set property_handler_flags = |
763 'static_cast<v8::PropertyHandlerFlags>(%s)' % | 757 'static_cast<v8::PropertyHandlerFlags>(%s)' % |
764 ' | '.join(property_handler_flags_list) %} | 758 ' | '.join(property_handler_flags_list) %} |
765 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig({{named_propert
y_getter_callback}}, {{named_property_setter_callback}}, {{named_property_query_
callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_cal
lback}}, v8::Local<v8::Value>(), {{property_handler_flags}}); | 759 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig({{named_propert
y_getter_callback}}, {{named_property_setter_callback}}, {{named_property_query_
callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_cal
lback}}, v8::Local<v8::Value>(), {{property_handler_flags}}); |
766 {{target}}->SetHandler(namedPropertyHandlerConfig); | 760 {{target}}->SetHandler(namedPropertyHandlerConfig); |
767 {%- endmacro %} | 761 {%- endmacro %} |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 | 986 |
993 {% 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 %} |
994 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>&)) |
995 { | 989 { |
996 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 990 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
997 } | 991 } |
998 | 992 |
999 {% endfor %} | 993 {% endfor %} |
1000 {% endif %} | 994 {% endif %} |
1001 {% endblock %} | 995 {% endblock %} |
OLD | NEW |