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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 and is_node and not attribute.is_implemented_in_private_script %} | 210 and is_node and not attribute.is_implemented_in_private_script %} |
211 {% set cpp_class, v8_class = 'Element', 'V8Element' %} | 211 {% set cpp_class, v8_class = 'Element', 'V8Element' %} |
212 {% endif %} | 212 {% endif %} |
213 {# Local variables #} | 213 {# Local variables #} |
214 {% if not attribute.is_static %} | 214 {% if not attribute.is_static %} |
215 v8::Local<v8::Object> holder = info.Holder(); | 215 v8::Local<v8::Object> holder = info.Holder(); |
216 {% endif %} | 216 {% endif %} |
217 {% if attribute.has_setter_exception_state %} | 217 {% if attribute.has_setter_exception_state %} |
218 ExceptionState exceptionState(ExceptionState::SetterContext, "{{attribute.na
me}}", "{{interface_name}}", holder, info.GetIsolate()); | 218 ExceptionState exceptionState(ExceptionState::SetterContext, "{{attribute.na
me}}", "{{interface_name}}", holder, info.GetIsolate()); |
219 {% endif %} | 219 {% endif %} |
220 {% if attribute.use_output_parameter_for_result %} | |
221 {{attribute.cpp_type}} cppValue; | |
222 {% endif %} | |
223 {# impl #} | 220 {# impl #} |
224 {% if attribute.put_forwards %} | 221 {% if attribute.put_forwards %} |
225 {{cpp_class}}* proxyImpl = {{v8_class}}::toImpl(holder); | 222 {{cpp_class}}* proxyImpl = {{v8_class}}::toImpl(holder); |
226 {{attribute.cpp_type}} impl = WTF::getPtr(proxyImpl->{{attribute.name}}()); | 223 {{attribute.cpp_type}} impl = WTF::getPtr(proxyImpl->{{attribute.name}}()); |
227 if (!impl) | 224 if (!impl) |
228 return; | 225 return; |
229 {% elif not attribute.is_static %} | 226 {% elif not attribute.is_static %} |
230 {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); | 227 {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); |
231 {% endif %} | 228 {% endif %} |
232 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %} | 229 {% if attribute.idl_type == 'EventHandler' and interface_name == 'Window' %} |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 access_control, | 420 access_control, |
424 property_attribute, | 421 property_attribute, |
425 only_exposed_to_private_script, | 422 only_exposed_to_private_script, |
426 ] %} | 423 ] %} |
427 {% if not attribute.is_expose_js_accessors %} | 424 {% if not attribute.is_expose_js_accessors %} |
428 {% set attribute_configuration_list = attribute_configuration_list | 425 {% set attribute_configuration_list = attribute_configuration_list |
429 + [on_prototype] %} | 426 + [on_prototype] %} |
430 {% endif %} | 427 {% endif %} |
431 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 428 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
432 {%- endmacro %} | 429 {%- endmacro %} |
OLD | NEW |