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

Unified Diff: Source/bindings/scripts/v8_interface.py

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 | « no previous file | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index c63a368042f644a5223c366c40462b27171c61c4..c7b1093a1871d46b94dc2a5830270d81b1d59755 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -227,11 +227,15 @@ def interface_context(interface):
'named_constructor': named_constructor,
})
+ constants = [constant_context(constant) for constant in interface.constants]
+
# Constants
context.update({
- 'constants': [constant_context(constant)
- for constant in interface.constants],
+ 'constants': constants,
'do_not_check_constants': 'DoNotCheckConstants' in extended_attributes,
+ 'has_constant_configuration': any(
+ not constant['runtime_enabled_function']
+ for constant in constants),
})
# Attributes
« no previous file with comments | « no previous file | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698