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

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

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 cb770bb9492051f5897afb10dd0e83c8c1c585f9..61b39eb0ed53a8ec10db6bc043c6b5541eaf68ee 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
@@ -365,6 +365,14 @@ def cpp_name_or_partial(interface):
return cpp_class_name
+def is_experimental_api(interface):
+ return 'ExperimentEnabled' in interface.extended_attributes
+
+
+def experimental_api_name(interface):
+ return interface.extended_attributes['ExperimentEnabled'] if is_experimental_api(interface) else None
+
+
# [MeasureAs]
def measure_as(definition_or_member, interface):
extended_attributes = definition_or_member.extended_attributes

Powered by Google App Engine
This is Rietveld 408576698