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

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

Issue 2578943002: [Bindings] Refactoring of binding code around runtime enabled features (Closed)
Patch Set: Work for a comment Created 4 years 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/v8_utilities.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
index 4c8dba829f4af8ceb6915f2d0555d9fbbb9a99e3..4fb4ea4802657d1cb2aa4ca52c496aa872abab8b 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
@@ -427,31 +427,13 @@ def origin_trial_feature_name(definition_or_member):
return extended_attributes.get('OriginTrialEnabled') or extended_attributes.get('FeaturePolicy')
-def runtime_feature_name(definition_or_member):
+# [RuntimeEnabled]
+def runtime_enabled_feature_name(definition_or_member):
extended_attributes = definition_or_member.extended_attributes
if 'RuntimeEnabled' not in extended_attributes:
return None
- return extended_attributes['RuntimeEnabled']
-
-
-# [RuntimeEnabled]
-def runtime_enabled_function_name(definition_or_member):
- """Returns the name of the RuntimeEnabledFeatures function.
-
- The returned function checks if a method/attribute is enabled.
- Given extended attribute RuntimeEnabled=FeatureName, return:
- RuntimeEnabledFeatures::{featureName}Enabled
-
- If the RuntimeEnabled extended attribute is found, the includes
- are also updated as a side-effect.
- """
- feature_name = runtime_feature_name(definition_or_member)
-
- if not feature_name:
- return
-
includes.add('platform/RuntimeEnabledFeatures.h')
- return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name)
+ return extended_attributes['RuntimeEnabled']
# [Unforgeable]

Powered by Google App Engine
This is Rietveld 408576698