| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro attribute_getter(attribute, world_suffix) %} | 2 {% macro attribute_getter(attribute, world_suffix) %} |
| 3 {% filter conditional(attribute.conditional_string) %} | 3 {% filter conditional(attribute.conditional_string) %} |
| 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
| 5 {%- if attribute.is_expose_js_accessors %} | 5 {%- if attribute.is_expose_js_accessors %} |
| 6 const v8::FunctionCallbackInfo<v8::Value>& info | 6 const v8::FunctionCallbackInfo<v8::Value>& info |
| 7 {%- else %} | 7 {%- else %} |
| 8 const v8::PropertyCallbackInfo<v8::Value>& info | 8 const v8::PropertyCallbackInfo<v8::Value>& info |
| 9 {%- endif %}) | 9 {%- endif %}) |
| 10 { | 10 { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 {% endfilter %} | 111 {% endfilter %} |
| 112 {% endmacro %} | 112 {% endmacro %} |
| 113 | 113 |
| 114 {######################################} | 114 {######################################} |
| 115 {% macro release_only_check(reflect_only_values, reflect_missing, | 115 {% macro release_only_check(reflect_only_values, reflect_missing, |
| 116 reflect_invalid, reflect_empty) %} | 116 reflect_invalid, reflect_empty) %} |
| 117 {# Attribute is limited to only known values: check that the attribute value is | 117 {# Attribute is limited to only known values: check that the attribute value is |
| 118 one of those. If not, set it to the empty string. | 118 one of those. If not, set it to the empty string. |
| 119 http://www.whatwg.org/specs/web-apps/current-work/#limited-to-only-known-valu
es #} | 119 http://www.whatwg.org/specs/web-apps/current-work/#limited-to-only-known-valu
es #} |
| 120 {# FIXME: rename resultValue to jsValue #} | |
| 121 {% if reflect_empty %} | 120 {% if reflect_empty %} |
| 122 if (resultValue.isNull()) { | 121 if (jsValue.isNull()) { |
| 123 {% if reflect_missing %} | 122 {% if reflect_missing %} |
| 124 resultValue = "{{reflect_missing}}"; | 123 jsValue = "{{reflect_missing}}"; |
| 125 {% else %} | 124 {% else %} |
| 126 ; | 125 ; |
| 127 {% endif %} | 126 {% endif %} |
| 128 } else if (resultValue.isEmpty()) { | 127 } else if (jsValue.isEmpty()) { |
| 129 resultValue = "{{reflect_empty}}"; | 128 jsValue = "{{reflect_empty}}"; |
| 130 {% else %} | 129 {% else %} |
| 131 if (resultValue.isEmpty()) { | 130 if (jsValue.isEmpty()) { |
| 132 {# FIXME: should use [ReflectEmpty] instead; need to change IDL files #} | 131 {# FIXME: should use [ReflectEmpty] instead; need to change IDL files #} |
| 133 {% if reflect_missing %} | 132 {% if reflect_missing %} |
| 134 resultValue = "{{reflect_missing}}"; | 133 jsValue = "{{reflect_missing}}"; |
| 135 {% else %} | 134 {% else %} |
| 136 ; | 135 ; |
| 137 {% endif %} | 136 {% endif %} |
| 138 {% endif %} | 137 {% endif %} |
| 139 {% for value in reflect_only_values %} | 138 {% for value in reflect_only_values %} |
| 140 } else if (equalIgnoringCase(resultValue, "{{value}}")) { | 139 } else if (equalIgnoringCase(jsValue, "{{value}}")) { |
| 141 resultValue = "{{value}}"; | 140 jsValue = "{{value}}"; |
| 142 {% endfor %} | 141 {% endfor %} |
| 143 } else { | 142 } else { |
| 144 resultValue = "{{reflect_invalid}}"; | 143 jsValue = "{{reflect_invalid}}"; |
| 145 } | 144 } |
| 146 {% endmacro %} | 145 {% endmacro %} |
| 147 | 146 |
| 148 | 147 |
| 149 {##############################################################################} | 148 {##############################################################################} |
| 150 {% macro attribute_getter_callback(attribute, world_suffix) %} | 149 {% macro attribute_getter_callback(attribute, world_suffix) %} |
| 151 {% filter conditional(attribute.conditional_string) %} | 150 {% filter conditional(attribute.conditional_string) %} |
| 152 static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( | 151 static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( |
| 153 {%- if attribute.is_expose_js_accessors %} | 152 {%- if attribute.is_expose_js_accessors %} |
| 154 const v8::FunctionCallbackInfo<v8::Value>& info | 153 const v8::FunctionCallbackInfo<v8::Value>& info |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 {% endif %} | 308 {% endif %} |
| 310 {% if attribute.has_custom_setter %} | 309 {% if attribute.has_custom_setter %} |
| 311 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); | 310 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); |
| 312 {% else %} | 311 {% else %} |
| 313 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j
sValue, info); | 312 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j
sValue, info); |
| 314 {% endif %} | 313 {% endif %} |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 316 } | 315 } |
| 317 {% endfilter %} | 316 {% endfilter %} |
| 318 {% endmacro %} | 317 {% endmacro %} |
| OLD | NEW |