| OLD | NEW |
| 1 {% from 'utilities.cpp' import check_origin_trial %} | |
| 2 | |
| 3 {##############################################################################} | 1 {##############################################################################} |
| 4 {% macro constant_getter_callback(constant) %} | 2 {% macro constant_getter_callback(constant) %} |
| 5 static void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 3 static void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 6 { | 4 { |
| 7 {% if constant.deprecate_as %} | 5 {% if constant.deprecate_as %} |
| 8 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}}); | 6 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}}); |
| 9 {% endif %} | 7 {% endif %} |
| 10 {% if constant.measure_as %} | 8 {% if constant.measure_as %} |
| 11 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}}); | 9 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}}); |
| 12 {% endif %} | 10 {% endif %} |
| 13 {% if constant.origin_trial_enabled_function %} | |
| 14 {{check_origin_trial(constant) | indent}} | |
| 15 {% endif %} | |
| 16 {% if constant.idl_type in ('Double', 'Float') %} | 11 {% if constant.idl_type in ('Double', 'Float') %} |
| 17 v8SetReturnValue(info, {{constant.value}}); | 12 v8SetReturnValue(info, {{constant.value}}); |
| 18 {% elif constant.idl_type == 'String' %} | 13 {% elif constant.idl_type == 'String' %} |
| 19 v8SetReturnValueString(info, "{{constant.value}}"); | 14 v8SetReturnValueString(info, "{{constant.value}}"); |
| 20 {% else %} | 15 {% else %} |
| 21 v8SetReturnValueInt(info, {{constant.value}}); | 16 v8SetReturnValueInt(info, {{constant.value}}); |
| 22 {% endif %} | 17 {% endif %} |
| 23 } | 18 } |
| 24 {% endmacro %} | 19 {% endmacro %} |
| 25 | 20 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 {######################################} | 59 {######################################} |
| 65 {%- macro constant_configuration(constant) %} | 60 {%- macro constant_configuration(constant) %} |
| 66 {% if constant.idl_type in ('Double', 'Float') %} | 61 {% if constant.idl_type in ('Double', 'Float') %} |
| 67 {% set value = '0, %s' % constant.value %} | 62 {% set value = '0, %s' % constant.value %} |
| 68 {% else %} | 63 {% else %} |
| 69 {# 'Short', 'Long' etc. #} | 64 {# 'Short', 'Long' etc. #} |
| 70 {% set value = '%s, 0' % constant.value %} | 65 {% set value = '%s, 0' % constant.value %} |
| 71 {% endif %} | 66 {% endif %} |
| 72 {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_
type}}} | 67 {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_
type}}} |
| 73 {%- endmacro %} | 68 {%- endmacro %} |
| OLD | NEW |