OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 is_setter_raises_exception or has_strict_type_checking or | 116 is_setter_raises_exception or has_strict_type_checking or |
117 idl_type.is_integer_type), | 117 idl_type.is_integer_type), |
118 'is_static': attribute.is_static, | 118 'is_static': attribute.is_static, |
119 'is_url': 'URL' in extended_attributes, | 119 'is_url': 'URL' in extended_attributes, |
120 'is_unforgeable': 'Unforgeable' in extended_attributes, | 120 'is_unforgeable': 'Unforgeable' in extended_attributes, |
121 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] | 121 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] |
122 'name': attribute.name, | 122 'name': attribute.name, |
123 'per_context_enabled_function': v8_utilities.per_context_enabled_functio
n_name(attribute), # [PerContextEnabled] | 123 'per_context_enabled_function': v8_utilities.per_context_enabled_functio
n_name(attribute), # [PerContextEnabled] |
124 'property_attributes': property_attributes(attribute), | 124 'property_attributes': property_attributes(attribute), |
125 'put_forwards': 'PutForwards' in extended_attributes, | 125 'put_forwards': 'PutForwards' in extended_attributes, |
| 126 'ref_ptr': 'RefPtrWillBeRawPtr' if idl_type.is_will_be_garbage_collected
else 'RefPtr', |
126 'reflect_empty': extended_attributes.get('ReflectEmpty'), | 127 'reflect_empty': extended_attributes.get('ReflectEmpty'), |
127 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), | 128 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), |
128 'reflect_missing': extended_attributes.get('ReflectMissing'), | 129 'reflect_missing': extended_attributes.get('ReflectMissing'), |
129 'reflect_only': extended_attributes['ReflectOnly'].split('|') | 130 'reflect_only': extended_attributes['ReflectOnly'].split('|') |
130 if 'ReflectOnly' in extended_attributes else None, | 131 if 'ReflectOnly' in extended_attributes else None, |
131 'setter_callback': setter_callback_name(interface, attribute), | 132 'setter_callback': setter_callback_name(interface, attribute), |
132 'v8_type': v8_types.v8_type(base_idl_type), | 133 'v8_type': v8_types.v8_type(base_idl_type), |
133 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a
ttribute), # [RuntimeEnabled] | 134 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a
ttribute), # [RuntimeEnabled] |
134 'world_suffixes': ['', 'ForMainWorld'] | 135 'world_suffixes': ['', 'ForMainWorld'] |
135 if 'PerWorldBindings' in extended_attributes | 136 if 'PerWorldBindings' in extended_attributes |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 lambda self: strip_suffix(self.base_type, 'Constructor')) | 402 lambda self: strip_suffix(self.base_type, 'Constructor')) |
402 | 403 |
403 | 404 |
404 def is_constructor_attribute(attribute): | 405 def is_constructor_attribute(attribute): |
405 # FIXME: replace this with [ConstructorAttribute] extended attribute | 406 # FIXME: replace this with [ConstructorAttribute] extended attribute |
406 return attribute.idl_type.base_type.endswith('Constructor') | 407 return attribute.idl_type.base_type.endswith('Constructor') |
407 | 408 |
408 | 409 |
409 def generate_constructor_getter(interface, attribute, contents): | 410 def generate_constructor_getter(interface, attribute, contents): |
410 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 411 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
OLD | NEW |