| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 {% endif %} | 138 {% endif %} |
| 139 {% if not attribute.is_static %} | 139 {% if not attribute.is_static %} |
| 140 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); | 140 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 141 {% endif %} | 141 {% endif %} |
| 142 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %} | 142 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %} |
| 143 if (!imp->document()) | 143 if (!imp->document()) |
| 144 return; | 144 return; |
| 145 {% endif %} | 145 {% endif %} |
| 146 {% if attribute.idl_type != 'EventHandler' %} | 146 {% if attribute.idl_type != 'EventHandler' %} |
| 147 {{attribute.v8_value_to_local_cpp_value}}; | 147 {{attribute.v8_value_to_local_cpp_value}}; |
| 148 {% else %}{# EventHandler hack #} | 148 {% elif not is_node %}{# EventHandler hack #} |
| 149 transferHiddenDependency(info.Holder(), {{attribute.event_handler_getter_exp
ression}}, jsValue, {{v8_class}}::eventListenerCacheIndex, info.GetIsolate()); | 149 transferHiddenDependency(info.Holder(), {{attribute.event_handler_getter_exp
ression}}, jsValue, {{v8_class}}::eventListenerCacheIndex, info.GetIsolate()); |
| 150 {% endif %} | 150 {% endif %} |
| 151 {% if attribute.enum_validation_expression %} | 151 {% if attribute.enum_validation_expression %} |
| 152 {# Setter ignores invalid enum values: http://www.w3.org/TR/WebIDL/#idl-enum
s #} | 152 {# Setter ignores invalid enum values: http://www.w3.org/TR/WebIDL/#idl-enum
s #} |
| 153 String string = cppValue; | 153 String string = cppValue; |
| 154 if (!({{attribute.enum_validation_expression}})) | 154 if (!({{attribute.enum_validation_expression}})) |
| 155 return; | 155 return; |
| 156 {% endif %} | 156 {% endif %} |
| 157 {% if attribute.is_reflect %} | 157 {% if attribute.is_reflect %} |
| 158 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 158 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 {% endif %} | 204 {% endif %} |
| 205 {% if attribute.has_custom_setter %} | 205 {% if attribute.has_custom_setter %} |
| 206 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); | 206 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); |
| 207 {% else %} | 207 {% else %} |
| 208 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j
sValue, info); | 208 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j
sValue, info); |
| 209 {% endif %} | 209 {% endif %} |
| 210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 211 } | 211 } |
| 212 {% endfilter %} | 212 {% endfilter %} |
| 213 {% endmacro %} | 213 {% endmacro %} |
| OLD | NEW |