Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: Source/bindings/templates/interface_base.cpp

Issue 36793003: IDL compiler: constructor attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/templates/interface_base.cpp
diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp
index 9494226f881504cdfbaf74caf72592788e53ee61..6e5cee0da6e92b8e7113f8d92d2d622536701ac7 100644
--- a/Source/bindings/templates/interface_base.cpp
+++ b/Source/bindings/templates/interface_base.cpp
@@ -62,21 +62,26 @@ template <typename T> void V8_USE(T) { }
with context %}
{% for attribute in attributes %}
{% for world_suffix in attribute.world_suffixes %}
+{% if not attribute.is_constructor %}
{% if not attribute.has_custom_getter %}
{{attribute_getter(attribute, world_suffix)}}
{% endif %}
{{attribute_getter_callback(attribute, world_suffix)}}
+{% endif %}
{% endfor %}
-{# FIXME: merge these 2 for loops #}
+{# FIXME: merge these 2 for loops and not is_constructor checks #}
{% for world_suffix in attribute.world_suffixes %}
+{% if not attribute.is_constructor %}
{% if not (attribute.is_read_only or attribute.has_custom_setter) %}
{{attribute_setter(attribute, world_suffix)}}
{% endif %}
{% if not attribute.is_read_only or attribute.has_custom_setter %}{# Separate check needed for [Custom(Setter), Replaceable], which are read only but have a setter callback #}
{{attribute_setter_callback(attribute, world_suffix)}}
{% endif %}
+{% endif %}
{% endfor %}
{% endfor %}
+{% block constructor_getter %}{% endblock %}
{% block replaceable_attribute_setter_and_callback %}{% endblock %}
} // namespace {{cpp_class_name}}V8Internal

Powered by Google App Engine
This is Rietveld 408576698