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

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

Issue 499293003: IDL: Avoid generating empty ConstantConfiguration arrays (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 4 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
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/tests/idls/TestInterface2.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index a90e1585b72a599a7a5bd3c6b34a5a0566a16879..7cb171f33d2f5221a858e64696e6448327a8ac84 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -1079,6 +1079,7 @@ V8DOMConfiguration::installMethod({{method.function_template}}, {{method.signatu
{######################################}
{% macro install_constants() %}
+{% if has_constant_configuration %}
{# Normal (always enabled) constants #}
static const V8DOMConfiguration::ConstantConfiguration {{v8_class}}Constants[] = {
{% for constant in constants if not constant.runtime_enabled_function %}
@@ -1094,6 +1095,7 @@ static const V8DOMConfiguration::ConstantConfiguration {{v8_class}}Constants[] =
{% endfor %}
};
V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants), isolate);
+{% endif %}
{# Runtime-enabled constants #}
{% for constant in constants if constant.runtime_enabled_function %}
if ({{constant.runtime_enabled_function}}()) {
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/tests/idls/TestInterface2.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698