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

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: Remove 'return undefined and print a message' on constructors. 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..dc4cf6f8bf7c7945029791c1ff17eec95064f03f 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):
haraken 2015/12/18 02:35:51 is_experimental_api => is_api_experiment_enabled
Daniel Nishi 2015/12/18 05:11:42 Done.
+ return 'APIExperimentEnabled' in interface.extended_attributes
+
+
+def api_experiment_name(interface):
+ return interface.extended_attributes['APIExperimentEnabled'] 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