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

Unified Diff: third_party/WebKit/Source/bindings/templates/constants.cpp

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More sharing. 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/templates/constants.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/constants.cpp b/third_party/WebKit/Source/bindings/templates/constants.cpp
index bac23ca38f6fa129543b54c134c7c6d3b8336fa0..e71d7647a35574eb4e92886bb18a01befc3f2434 100644
--- a/third_party/WebKit/Source/bindings/templates/constants.cpp
+++ b/third_party/WebKit/Source/bindings/templates/constants.cpp
@@ -48,6 +48,13 @@ V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate
{% for constant in special_getter_constants %}
V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, prototypeTemplate, "{{constant.name}}", {{cpp_class}}V8Internal::{{constant.name}}ConstantGetterCallback);
{% endfor %}
+{# Constants with [ExperimentEnabled] only #}
+{% for constant in experimental_only_constants %}
+if (Experiments::isApiEnabled(ec, "{{constant['api_experiment_name']}}")) {
+ const V8DOMConfiguration::ConstantConfiguration constant{{constant.name}}Configuration = {{constant_configuration(constant)}};
+ V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constant{{constant.name}}Configuration);
+}
+{% endfor %}
{# Check constants #}
{% if not do_not_check_constants %}
{% for constant in constants %}

Powered by Google App Engine
This is Rietveld 408576698