OLD | NEW |
---|---|
(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 %} | |
OLD | NEW |