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

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

Issue 968583002: bindings: Supports conditionally-enabled accessors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 21268dce5298d4ac4c70cc473a22d7a1cadb8f88..4a7093f8fa246570655831ac2f819cafd32128b9 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -890,9 +890,13 @@ void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> i
{% for attribute in attributes if attribute.per_context_enabled_function or attribute.exposed_test %}
{% filter per_context_enabled(attribute.per_context_enabled_function) %}
{% filter exposed(attribute.exposed_test) %}
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
- {{attribute_configuration(attribute)}};
+ {% if attribute.is_expose_js_accessors %}
+ static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}};
+ V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorConfiguration);
+ {% else %}
+ static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration = {{attribute_configuration(attribute)}};
V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeObject, attributeConfiguration);
+ {% endif %}
{% endfilter %}
{% endfilter %}
{% endfor %}

Powered by Google App Engine
This is Rietveld 408576698