| Index: third_party/WebKit/Source/bindings/templates/utilities.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/templates/utilities.cpp b/third_party/WebKit/Source/bindings/templates/utilities.cpp
|
| index 646484535e36ff0b3ec925edefea0fedeb2e75eb..4695997d86397cd8b09e8585bf6824f0a7dc4513 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/utilities.cpp
|
| +++ b/third_party/WebKit/Source/bindings/templates/utilities.cpp
|
| @@ -55,22 +55,14 @@ const char* validValues[] = {
|
| {%- endmacro %}
|
|
|
|
|
| -{% macro check_origin_trial_internal(errorName, origin_trial_name) %}
|
| -{% if origin_trial_name %}
|
| -String {{errorName}};
|
| -if (!{{origin_trial_name}}(executionContext, {{errorName}})) {
|
| +{% macro check_origin_trial(member, isolate="info.GetIsolate()") -%}
|
| +ExecutionContext* executionContext = currentExecutionContext({{isolate}});
|
| +String errorMessage;
|
| +if (!{{member.origin_trial_enabled_function}}(executionContext, errorMessage)) {
|
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!{{errorName}}.isEmpty()) {
|
| - toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, {{errorName}}));
|
| + if (!errorMessage.isEmpty()) {
|
| + toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| }
|
| return;
|
| }
|
| -{% endif %}
|
| -{% endmacro %}
|
| -
|
| -
|
| -{% macro check_origin_trial(member, isolate="info.GetIsolate()") -%}
|
| -ExecutionContext* executionContext = currentExecutionContext({{isolate}});
|
| -{{check_origin_trial_internal("errorMessage", member.origin_trial_enabled_per_interface) -}}
|
| -{{check_origin_trial_internal("memberErrorMessage", member.origin_trial_enabled) -}}
|
| {% endmacro %}
|
|
|