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

Unified Diff: third_party/WebKit/Source/bindings/scripts/code_generator.py

Issue 2620153004: [Bindings] Code cleanup: Early return if funtime enabled interface is false (Closed)
Patch Set: . Created 3 years, 11 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: third_party/WebKit/Source/bindings/scripts/code_generator.py
diff --git a/third_party/WebKit/Source/bindings/scripts/code_generator.py b/third_party/WebKit/Source/bindings/scripts/code_generator.py
index cc69d997c107d8cf4ddd596cdc64ac34010370ba..e6e1764ed86e5f643d938b01051ccde0f2e80b93 100644
--- a/third_party/WebKit/Source/bindings/scripts/code_generator.py
+++ b/third_party/WebKit/Source/bindings/scripts/code_generator.py
@@ -69,7 +69,7 @@ def runtime_enabled_if(code, name):
if not name:
return code
- function = 'RuntimeEnabledFeatures::%sEnabled()' % v8_utilities.uncapitalize(name)
+ function = v8_utilities.runtime_enabled_function(name)
return generate_indented_conditional(code, function)
@@ -88,6 +88,7 @@ def initialize_jinja_env(cache_dir):
'format_blink_cpp_source_code': format_blink_cpp_source_code,
'format_remove_duplicates': format_remove_duplicates,
'runtime_enabled': runtime_enabled_if,
+ 'runtime_enabled_function': v8_utilities.runtime_enabled_function,
'secure_context': secure_context_if,
'unique_by': unique_by})
jinja_env.filters.update(constant_filters())

Powered by Google App Engine
This is Rietveld 408576698