OLD | NEW |
1 {##############################################################################} | 1 {##############################################################################} |
2 {% macro constant_getter_callback(constant) %} | 2 {% macro constant_getter_callback(constant) %} |
3 void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::Prop
ertyCallbackInfo<v8::Value>& info) { | 3 void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::Prop
ertyCallbackInfo<v8::Value>& info) { |
4 {% if constant.deprecate_as %} | 4 {% if constant.deprecate_as %} |
5 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExec
utionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}}); | 5 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{constant.deprecate_as}}); |
6 {% endif %} | 6 {% endif %} |
7 {% if constant.measure_as %} | 7 {% if constant.measure_as %} |
8 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext
(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}}); | 8 UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{co
nstant.measure_as('ConstantGetter')}}); |
9 {% endif %} | 9 {% endif %} |
10 {% if constant.idl_type in ('Double', 'Float') %} | 10 {% if constant.idl_type in ('Double', 'Float') %} |
11 v8SetReturnValue(info, {{constant.value}}); | 11 v8SetReturnValue(info, {{constant.value}}); |
12 {% elif constant.idl_type == 'String' %} | 12 {% elif constant.idl_type == 'String' %} |
13 v8SetReturnValueString(info, "{{constant.value}}"); | 13 v8SetReturnValueString(info, "{{constant.value}}"); |
14 {% else %} | 14 {% else %} |
15 v8SetReturnValueInt(info, {{constant.value}}); | 15 v8SetReturnValueInt(info, {{constant.value}}); |
16 {% endif %} | 16 {% endif %} |
17 } | 17 } |
18 {% endmacro %} | 18 {% endmacro %} |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 {######################################} | 58 {######################################} |
59 {%- macro constant_configuration(constant) %} | 59 {%- macro constant_configuration(constant) %} |
60 {% if constant.idl_type in ('Double', 'Float') %} | 60 {% if constant.idl_type in ('Double', 'Float') %} |
61 {% set value = '0, %s' % constant.value %} | 61 {% set value = '0, %s' % constant.value %} |
62 {% else %} | 62 {% else %} |
63 {# 'Short', 'Long' etc. #} | 63 {# 'Short', 'Long' etc. #} |
64 {% set value = '%s, 0' % constant.value %} | 64 {% set value = '%s, 0' % constant.value %} |
65 {% endif %} | 65 {% endif %} |
66 {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_
type}}} | 66 {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_
type}}} |
67 {%- endmacro %} | 67 {%- endmacro %} |
OLD | NEW |