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

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: . 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 69e97890c176f1fde6451075fe645ebe62d91374..f74ce84c8d2cb1c1bb018f51ea8c3371120394bb 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
@@ -434,31 +434,13 @@ def origin_trial_feature_name(definition_or_member):
return extended_attributes.get('OriginTrialEnabled') or extended_attributes.get('FeaturePolicy')
+# [RuntimeEnabled]
def runtime_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