Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% macro attribute_configuration(attribute) %} | 5 {% macro attribute_configuration(attribute) %} |
| 6 {% set getter_callback = | 6 {% set getter_callback = |
| 7 '%sV8Internal::%sAttributeGetterCallback' % | 7 '%sV8Internal::%sAttributeGetterCallback' % |
| 8 (cpp_class, attribute.name) | 8 (cpp_class, attribute.name) |
| 9 if not attribute.constructor_type else | 9 if not attribute.constructor_type else |
| 10 ('%sV8Internal::%sConstructorGetterCallback' % | 10 ('%sV8Internal::%sConstructorGetterCallback' % |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 979 functionTemplate->{{set_on_template}}()->SetNamedPropertyHandler({{named_pro perty_getter_callback}}, {{named_property_setter_callback}}, {{named_property_qu ery_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator _callback}}); | 979 functionTemplate->{{set_on_template}}()->SetNamedPropertyHandler({{named_pro perty_getter_callback}}, {{named_property_setter_callback}}, {{named_property_qu ery_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator _callback}}); |
| 980 {% endif %} | 980 {% endif %} |
| 981 {# End special operations #} | 981 {# End special operations #} |
| 982 {% if has_custom_legacy_call_as_function %} | 982 {% if has_custom_legacy_call_as_function %} |
| 983 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); | 983 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); |
| 984 {% endif %} | 984 {% endif %} |
| 985 {% if interface_name == 'HTMLAllCollection' %} | 985 {% if interface_name == 'HTMLAllCollection' %} |
| 986 {# Needed for legacy support of document.all #} | 986 {# Needed for legacy support of document.all #} |
| 987 functionTemplate->InstanceTemplate()->MarkAsUndetectable(); | 987 functionTemplate->InstanceTemplate()->MarkAsUndetectable(); |
| 988 {% endif %} | 988 {% endif %} |
| 989 {% for method in methods if not method.do_not_check_signature %} | 989 {% for method in methods %} |
| 990 {# install_custom_signature #} | 990 {# install_custom_signature #} |
| 991 {% if not method.overload_index or method.overload_index == 1 %} | 991 {% if not(method.overloads.do_not_check_signature_all if method.overloads el se |
| 992 (method.overload_index or method.do_not_check_signature)) %} | |
| 992 {# For overloaded methods, only generate one accessor #} | 993 {# For overloaded methods, only generate one accessor #} |
| 993 {% filter conditional(method.conditional_string) %} | 994 {% filter conditional(method.conditional_string) %} |
| 995 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all if m ethod.overloads else | |
|
Jens Widell
2014/06/04 11:20:28
This is wrong if all overloads are runtime enabled
Jens Widell
2014/06/05 08:51:51
It occurs to me that the "Function.length is dynam
| |
| 996 method.runtime_enabled_function) %} | |
| 994 {% if method.is_do_not_check_security %} | 997 {% if method.is_do_not_check_security %} |
| 995 {% if method.is_per_world_bindings %} | 998 {% if method.is_per_world_bindings %} |
| 996 if (DOMWrapperWorld::current(isolate).isMainWorld()) { | 999 if (DOMWrapperWorld::current(isolate).isMainWorld()) { |
| 997 {{install_do_not_check_security_signature(method, 'ForMainWorld')}} | 1000 {{install_do_not_check_security_signature(method, 'ForMainWorld')}} |
| 998 } else { | 1001 } else { |
| 999 {{install_do_not_check_security_signature(method)}} | 1002 {{install_do_not_check_security_signature(method)}} |
| 1000 } | 1003 } |
| 1001 {% else %} | 1004 {% else %} |
| 1002 {{install_do_not_check_security_signature(method)}} | 1005 {{install_do_not_check_security_signature(method)}} |
| 1003 {% endif %} | 1006 {% endif %} |
| 1004 {% else %}{# is_do_not_check_security #} | 1007 {% else %}{# is_do_not_check_security #} |
| 1005 {% if method.is_per_world_bindings %} | 1008 {% if method.is_per_world_bindings %} |
| 1006 if (DOMWrapperWorld::current(isolate).isMainWorld()) { | 1009 if (DOMWrapperWorld::current(isolate).isMainWorld()) { |
| 1007 {% filter runtime_enabled(method.runtime_enabled_function) %} | |
| 1008 {{install_custom_signature(method, 'ForMainWorld')}} | 1010 {{install_custom_signature(method, 'ForMainWorld')}} |
| 1009 {% endfilter %} | |
| 1010 } else { | 1011 } else { |
| 1011 {% filter runtime_enabled(method.runtime_enabled_function) %} | |
| 1012 {{install_custom_signature(method)}} | 1012 {{install_custom_signature(method)}} |
| 1013 {% endfilter %} | |
| 1014 } | 1013 } |
| 1015 {% else %} | 1014 {% else %} |
| 1016 {% filter runtime_enabled(method.runtime_enabled_function) %} | |
| 1017 {{install_custom_signature(method)}} | 1015 {{install_custom_signature(method)}} |
| 1018 {% endfilter %} | |
| 1019 {% endif %} | 1016 {% endif %} |
| 1020 {% endif %}{# is_do_not_check_security #} | 1017 {% endif %}{# is_do_not_check_security #} |
| 1021 {% endfilter %} | 1018 {% endfilter %}{# runtime_enabled() #} |
| 1019 {% endfilter %}{# conditional() #} | |
| 1022 {% endif %}{# install_custom_signature #} | 1020 {% endif %}{# install_custom_signature #} |
| 1023 {% endfor %} | 1021 {% endfor %} |
| 1024 {% for attribute in attributes if attribute.is_static %} | 1022 {% for attribute in attributes if attribute.is_static %} |
| 1025 {% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' % | 1023 {% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' % |
| 1026 (cpp_class, attribute.name) %} | 1024 (cpp_class, attribute.name) %} |
| 1027 {% filter conditional(attribute.conditional_string) %} | 1025 {% filter conditional(attribute.conditional_string) %} |
| 1028 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "{{attribute .name}}"), {{getter_callback}}, {{attribute.setter_callback}}, v8::External::New (isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 1026 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "{{attribute .name}}"), {{getter_callback}}, {{attribute.setter_callback}}, v8::External::New (isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 1029 {% endfilter %} | 1027 {% endfilter %} |
| 1030 {% endfor %} | 1028 {% endfor %} |
| 1031 {# Special interfaces #} | 1029 {# Special interfaces #} |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1335 {% endif %} | 1333 {% endif %} |
| 1336 } | 1334 } |
| 1337 | 1335 |
| 1338 template<> | 1336 template<> |
| 1339 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) | 1337 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) |
| 1340 { | 1338 { |
| 1341 return toV8(impl, creationContext, isolate); | 1339 return toV8(impl, creationContext, isolate); |
| 1342 } | 1340 } |
| 1343 | 1341 |
| 1344 {% endblock %} | 1342 {% endblock %} |
| OLD | NEW |