| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro attribute_getter(cpp_class, attribute) %} | 2 {% macro attribute_getter(cpp_class, attribute) %} |
| 3 static void {{static_attribute_name(attribute, 'Getter')}}(Dart_NativeArguments
args) { | 3 static void {{static_attribute_name(attribute, 'Getter')}}(Dart_NativeArguments
args) { |
| 4 {% if attribute.is_getter_raises_exception or attribute.is_call_with_execution_c
ontext %} | 4 {% if attribute.is_getter_raises_exception or attribute.is_call_with_execution_c
ontext %} |
| 5 Dart_Handle exception = nullptr; | 5 Dart_Handle exception = nullptr; |
| 6 {% endif %} | 6 {% endif %} |
| 7 { | 7 { |
| 8 {% if attribute.is_call_with_execution_context %} | 8 {% if attribute.is_call_with_execution_context %} |
| 9 ExecutionContext* context = DOMDartState::CurrentDocument(); | 9 ExecutionContext* context = DOMDartState::CurrentDocument(); |
| 10 if (!context) { | 10 if (!context) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 { | 76 { |
| 77 {% if attribute.idl_type == "EventHandler" or not attribute.cpp_setter %} | 77 {% if attribute.idl_type == "EventHandler" or not attribute.cpp_setter %} |
| 78 {# TODO(terry): Need to fix properly. #} | 78 {# TODO(terry): Need to fix properly. #} |
| 79 // FIXME: proper implementation. | 79 // FIXME: proper implementation. |
| 80 DART_UNIMPLEMENTED(); | 80 DART_UNIMPLEMENTED(); |
| 81 {% else %} | 81 {% else %} |
| 82 Dart_Handle exception = nullptr; | 82 Dart_Handle exception = nullptr; |
| 83 { | 83 { |
| 84 {{cpp_class}}* receiver = GetReceiver<{{cpp_class}}>(args); | 84 {{cpp_class}}* receiver = GetReceiver<{{cpp_class}}>(args); |
| 85 {% if attribute.is_custom_element_callbacks %} | 85 {% if attribute.is_custom_element_callbacks %} |
| 86 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 86 NewCustomElementCallbackScope deliveryScope; |
| 87 {% endif %} | 87 {% endif %} |
| 88 {% set attribute_name = attribute.name if not attribute.put_forwards else 'value
' %} | 88 {% set attribute_name = attribute.name if not attribute.put_forwards else 'value
' %} |
| 89 | 89 |
| 90 {{attribute.local_cpp_type}} {{attribute.setter_lvalue}} = {{attribute.d
art_value_to_local_cpp_value}}; | 90 {{attribute.local_cpp_type}} {{attribute.setter_lvalue}} = {{attribute.d
art_value_to_local_cpp_value}}; |
| 91 if (exception) | 91 if (exception) |
| 92 goto fail; | 92 goto fail; |
| 93 {% if attribute.is_call_with_execution_context or | 93 {% if attribute.is_call_with_execution_context or |
| 94 attribute.is_setter_call_with_execution_context %} | 94 attribute.is_setter_call_with_execution_context %} |
| 95 | 95 |
| 96 ExecutionContext* context = DOMDartState::CurrentDocument(); | 96 ExecutionContext* context = DOMDartState::CurrentDocument(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 {% macro generate_attribute_symbolizer_body(dart_class, class_name, attribute) %
} | 195 {% macro generate_attribute_symbolizer_body(dart_class, class_name, attribute) %
} |
| 196 if (native_function == {{dart_class}}Internal::{{static_attribute_name(attribute
, 'Getter')}}) { | 196 if (native_function == {{dart_class}}Internal::{{static_attribute_name(attribute
, 'Getter')}}) { |
| 197 return reinterpret_cast<const uint8_t*>("{{attribute.native_entry_getter.res
olver_string}}"); | 197 return reinterpret_cast<const uint8_t*>("{{attribute.native_entry_getter.res
olver_string}}"); |
| 198 } | 198 } |
| 199 {% if not attribute.is_read_only %} | 199 {% if not attribute.is_read_only %} |
| 200 if (native_function == {{dart_class}}Internal::{{static_attribute_name(attribute
, 'Setter')}}) { | 200 if (native_function == {{dart_class}}Internal::{{static_attribute_name(attribute
, 'Setter')}}) { |
| 201 return reinterpret_cast<const uint8_t*>("{{attribute.native_entry_setter.res
olver_string}}"); | 201 return reinterpret_cast<const uint8_t*>("{{attribute.native_entry_setter.res
olver_string}}"); |
| 202 } | 202 } |
| 203 {% endif %} | 203 {% endif %} |
| 204 {% endmacro %} | 204 {% endmacro %} |
| OLD | NEW |