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

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

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/templates/interface.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp b/third_party/WebKit/Source/bindings/templates/interface.cpp
index a44d2d110b06e0dbfd8930d396d3763e9fa062da..beef4eb70085733b75afcfb2a5276fa48f3de1f8 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp
@@ -903,10 +903,14 @@ if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol)))
unscopeables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecked().As<v8::Object>();
else
unscopeables = v8::Object::New(isolate);
-{% for name, runtime_enabled_function in unscopeables %}
+String errorMessage;
+ALLOW_UNUSED_LOCAL(errorMessage);
+{% for name, runtime_enabled_function, experimental_api_name in unscopeables %}
{% filter runtime_enabled(runtime_enabled_function) %}
+{% filter experiment_enabled(experimental_api_name, "errorMessage") %}
unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "{{name}}"), v8::True(isolate)).FromJust();
{% endfilter %}
+{% endfilter %}
{% endfor %}
prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables).FromJust();
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698