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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/api_experiment.cpp

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Install interfaces/attributes/methods unconditionally. Use the generated ExperimentalFeature functi… Created 4 years, 11 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 {% macro check_api_experiment_internal(errorName, experiment_name) %}
haraken 2015/12/30 00:25:32 Could you move this macro to conversions.cpp (and
Daniel Nishi 2015/12/30 22:05:50 Done.
2 {% if experiment_name %}
3 String {{errorName}};
4 if (!{{experiment_name}}(currentExecutionContext(info.GetIsolate()), {{errorName }})) {
5 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
6 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()) );
haraken 2015/12/30 00:25:32 Avoid calling currentExecutionContext twice.
Daniel Nishi 2015/12/30 22:05:50 Done.
7 document.addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMes sageLevel, {{errorName}}));
8 return;
9 }
10 {% endif %}
11 {% endmacro %}
12 {% macro check_api_experiment(member) %}
13 {{check_api_experiment_internal("errorMessage", member.api_experiment_inherited_ enabled)}}
14 {{check_api_experiment_internal("memberErrorMessage", member.api_experiment_enab led)}}
15 {% endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698