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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 is_setter_raises_exception or has_strict_type_checking or | 115 is_setter_raises_exception or has_strict_type_checking or |
116 v8_types.is_integer_type(idl_type)), | 116 v8_types.is_integer_type(idl_type)), |
117 'is_static': attribute.is_static, | 117 'is_static': attribute.is_static, |
118 'is_url': 'URL' in extended_attributes, | 118 'is_url': 'URL' in extended_attributes, |
119 'is_unforgeable': 'Unforgeable' in extended_attributes, | 119 'is_unforgeable': 'Unforgeable' in extended_attributes, |
120 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] | 120 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] |
121 'name': attribute.name, | 121 'name': attribute.name, |
122 'per_context_enabled_function': v8_utilities.per_context_enabled_functio
n_name(attribute), # [PerContextEnabled] | 122 'per_context_enabled_function': v8_utilities.per_context_enabled_functio
n_name(attribute), # [PerContextEnabled] |
123 'property_attributes': property_attributes(attribute), | 123 'property_attributes': property_attributes(attribute), |
124 'put_forwards': 'PutForwards' in extended_attributes, | 124 'put_forwards': 'PutForwards' in extended_attributes, |
| 125 'reflect_empty': extended_attributes.get('ReflectEmpty'), |
125 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), | 126 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), |
126 'reflect_missing': extended_attributes.get('ReflectMissing'), | 127 'reflect_missing': extended_attributes.get('ReflectMissing'), |
127 'reflect_only': extended_attributes['ReflectOnly'].split('|') | 128 'reflect_only': extended_attributes['ReflectOnly'].split('|') |
128 if 'ReflectOnly' in extended_attributes else None, | 129 if 'ReflectOnly' in extended_attributes else None, |
129 'setter_callback': setter_callback_name(interface, attribute), | 130 'setter_callback': setter_callback_name(interface, attribute), |
130 'v8_type': v8_types.v8_type(idl_type), | 131 'v8_type': v8_types.v8_type(idl_type), |
131 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a
ttribute), # [RuntimeEnabled] | 132 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a
ttribute), # [RuntimeEnabled] |
132 'world_suffixes': ['', 'ForMainWorld'] | 133 'world_suffixes': ['', 'ForMainWorld'] |
133 if 'PerWorldBindings' in extended_attributes | 134 if 'PerWorldBindings' in extended_attributes |
134 else [''], # [PerWorldBindings] | 135 else [''], # [PerWorldBindings] |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 property_attributes_list.append('v8::DontDelete') | 386 property_attributes_list.append('v8::DontDelete') |
386 return property_attributes_list or ['v8::None'] | 387 return property_attributes_list or ['v8::None'] |
387 | 388 |
388 | 389 |
389 ################################################################################ | 390 ################################################################################ |
390 # Constructors | 391 # Constructors |
391 ################################################################################ | 392 ################################################################################ |
392 | 393 |
393 def is_constructor_attribute(attribute): | 394 def is_constructor_attribute(attribute): |
394 return attribute.idl_type.endswith('Constructor') | 395 return attribute.idl_type.endswith('Constructor') |
OLD | NEW |