Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| index 0f9744bdcef8aea0ab3eb9ab6bc50b8f58166fa8..2bd55fd7c1e17d2cc4c863055c5073c66e308e2a 100644 |
| --- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| +++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| @@ -230,6 +230,27 @@ const V8DOMConfiguration::AttributeConfiguration {{v8_class}}Attributes[] = { |
| {% endif %} |
| {% endblock %} |
| {##############################################################################} |
| +{% block install_lazy_data_attributes %} |
| +{% from 'attributes.cpp.tmpl' import attribute_configuration with context %} |
| +{% if attributes | has_lazy_data_configuration %} |
| +// Suppress warning: global constructors, because AttributeConfiguration is trivial |
| +// and does not depend on another global objects. |
| +#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| +#pragma clang diagnostic push |
| +#pragma clang diagnostic ignored "-Wglobal-constructors" |
| +#endif |
| +const V8DOMConfiguration::AttributeConfiguration {{v8_class}}LazyAttributes[] = { |
|
haraken
2016/11/01 07:17:31
LazyDataAttributes
jochen (gone - plz use gerrit)
2016/11/02 11:57:01
done
|
| + {% for attribute in attributes | has_lazy_data_configuration %} |
| + {{attribute_configuration(attribute)}}, |
| + {% endfor %} |
| +}; |
| +#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| +#pragma clang diagnostic pop |
| +#endif |
| + |
| +{% endif %} |
| +{% endblock %} |
| +{##############################################################################} |
| {% block install_accessors %} |
| {% from 'attributes.cpp.tmpl' import attribute_configuration with context %} |
| {% if attributes | has_accessor_configuration %} |
| @@ -305,6 +326,9 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo |
| {% if attributes | has_attribute_configuration %} |
| V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}}); |
| {% endif %} |
| + {% if attributes | has_lazy_data_configuration %} |
| + V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sLazyAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sLazyAttributes)' % v8_class}}); |
| + {% endif %} |
| {% if attributes | has_accessor_configuration %} |
| V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sAccessors' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class}}); |
| {% endif %} |