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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.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/methods.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp b/third_party/WebKit/Source/bindings/templates/methods.cpp
index c9295cdb161dd59f47fef4cb27ac0742c9f17d09..bc199592f896505a08ef0105b262e42a3691724b 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp
@@ -366,7 +366,7 @@ createMinimumArityTypeErrorForMethod(info.GetIsolate(), "{{method.name}}", "{{in
static int {{overloads.name}}MethodLength()
{
{% for length, runtime_enabled_functions in overloads.runtime_determined_lengths %}
- {% for runtime_enabled_function in runtime_enabled_functions %}
+{% for runtime_enabled_function in runtime_enabled_functions %}
{% filter runtime_enabled(runtime_enabled_function) %}
return {{length}};
{% endfilter %}
@@ -701,12 +701,10 @@ v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTempl
ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext());
ASSERT(executionContext);
{% for method in conditionally_enabled_methods %}
-{% filter exposed(method.overloads.exposed_test_all
- if method.overloads else
- method.exposed_test) %}
-{% filter runtime_enabled(method.overloads.runtime_enabled_function_all
- if method.overloads else
- method.runtime_enabled_function) %}
+{% set runtime_enabled_function, api_experiment_name, exposure = (method.overloads.runtime_enabled_function_all, method.overloads.api_experiment_name_all, method.overloads.exposed_test_all) if method.overloads
+ else (method.runtime_enabled_function, method.api_experiment_name, method.exposed_test) %}
+{% filter exposed(exposure) %}
+{% filter runtime_enabled(runtime_enabled_function) %}
const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObject, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration);
{% endfilter %}{# runtime_enabled() #}

Powered by Google App Engine
This is Rietveld 408576698