Chromium Code Reviews| Index: Source/bindings/scripts/v8_attributes.py |
| diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py |
| index 13256457f6c3bbe4ea057131760e55f8c8dc0694..a98e9523e7e9f96834399f322b1751393be41cf8 100644 |
| --- a/Source/bindings/scripts/v8_attributes.py |
| +++ b/Source/bindings/scripts/v8_attributes.py |
| @@ -125,6 +125,7 @@ def attribute_context(interface, attribute): |
| 'is_static': attribute.is_static, |
| 'is_url': 'URL' in extended_attributes, |
| 'is_unforgeable': 'Unforgeable' in extended_attributes, |
| + 'is_union_type': idl_type.is_union_type, |
|
haraken
2014/11/04 23:50:09
is_union_type => use_output_parameter_for_result ?
bashi
2014/11/05 00:17:33
Done.
|
| 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] |
| 'name': attribute.name, |
| 'only_exposed_to_private_script': is_only_exposed_to_private_script, |
| @@ -234,6 +235,10 @@ def getter_expression(interface, attribute, context): |
| arguments.append('isNull') |
| if context['is_getter_raises_exception']: |
| arguments.append('exceptionState') |
| + # Union type attribute getters take impl class object as the last argument |
| + # and set value to it, not returning the value. |
| + if attribute.idl_type.is_union_type: |
|
Jens Widell
2014/11/04 12:19:07
Use v8_methods.use_output_parameter_for_result() p
bashi
2014/11/05 00:17:33
Yes. We should use use_output_parameter_for_result
|
| + arguments.append('result') |
| return '%s(%s)' % (getter_name, ', '.join(arguments)) |