| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if is_custom_element_callbacks or is_reflect: | 94 if is_custom_element_callbacks or is_reflect: |
| 95 includes.add('core/dom/custom/V0CustomElementProcessingStack.h') | 95 includes.add('core/dom/custom/V0CustomElementProcessingStack.h') |
| 96 # [PerWorldBindings] | 96 # [PerWorldBindings] |
| 97 if 'PerWorldBindings' in extended_attributes: | 97 if 'PerWorldBindings' in extended_attributes: |
| 98 assert idl_type.is_wrapper_type or 'LogActivity' in extended_attributes,
'[PerWorldBindings] should only be used with wrapper types: %s.%s' % (interface
.name, attribute.name) | 98 assert idl_type.is_wrapper_type or 'LogActivity' in extended_attributes,
'[PerWorldBindings] should only be used with wrapper types: %s.%s' % (interface
.name, attribute.name) |
| 99 # [SaveSameObject] | 99 # [SaveSameObject] |
| 100 is_save_same_object = ( | 100 is_save_same_object = ( |
| 101 'SameObject' in attribute.extended_attributes and | 101 'SameObject' in attribute.extended_attributes and |
| 102 'SaveSameObject' in attribute.extended_attributes) | 102 'SaveSameObject' in attribute.extended_attributes) |
| 103 if is_save_same_object: | 103 if is_save_same_object: |
| 104 includes.add('bindings/core/v8/V8PrivateProperty.h') | 104 includes.add('platform/bindings/V8PrivateProperty.h') |
| 105 | 105 |
| 106 if (base_idl_type == 'EventHandler' and | 106 if (base_idl_type == 'EventHandler' and |
| 107 interface.name in ['Window', 'WorkerGlobalScope'] and | 107 interface.name in ['Window', 'WorkerGlobalScope'] and |
| 108 attribute.name == 'onerror'): | 108 attribute.name == 'onerror'): |
| 109 includes.add('bindings/core/v8/V8ErrorHandler.h') | 109 includes.add('bindings/core/v8/V8ErrorHandler.h') |
| 110 | 110 |
| 111 cached_attribute_validation_method = extended_attributes.get('CachedAttribut
e') | 111 cached_attribute_validation_method = extended_attributes.get('CachedAttribut
e') |
| 112 keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute) | 112 keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute) |
| 113 if cached_attribute_validation_method or keep_alive_for_gc: | 113 if cached_attribute_validation_method or keep_alive_for_gc: |
| 114 includes.add('bindings/core/v8/V8PrivateProperty.h') | 114 includes.add('platform/bindings/V8PrivateProperty.h') |
| 115 | 115 |
| 116 # [CachedAccessor] | 116 # [CachedAccessor] |
| 117 is_cached_accessor = 'CachedAccessor' in extended_attributes | 117 is_cached_accessor = 'CachedAccessor' in extended_attributes |
| 118 if is_cached_accessor: | 118 if is_cached_accessor: |
| 119 includes.add('bindings/core/v8/V8PrivateProperty.h') | 119 includes.add('platform/bindings/V8PrivateProperty.h') |
| 120 | 120 |
| 121 context = { | 121 context = { |
| 122 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_
world_list(attribute, 'Getter'), # [ActivityLogging] | 122 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_
world_list(attribute, 'Getter'), # [ActivityLogging] |
| 123 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_
world_list(attribute, 'Setter'), # [ActivityLogging] | 123 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_
world_list(attribute, 'Setter'), # [ActivityLogging] |
| 124 'activity_logging_world_check': v8_utilities.activity_logging_world_chec
k(attribute), # [ActivityLogging] | 124 'activity_logging_world_check': v8_utilities.activity_logging_world_chec
k(attribute), # [ActivityLogging] |
| 125 'cached_attribute_validation_method': cached_attribute_validation_method
, | 125 'cached_attribute_validation_method': cached_attribute_validation_method
, |
| 126 'constructor_type': constructor_type, | 126 'constructor_type': constructor_type, |
| 127 'cpp_name': cpp_name(attribute), | 127 'cpp_name': cpp_name(attribute), |
| 128 'cpp_type': idl_type.cpp_type, | 128 'cpp_type': idl_type.cpp_type, |
| 129 'cpp_type_initializer': idl_type.cpp_type_initializer, | 129 'cpp_type_initializer': idl_type.cpp_type_initializer, |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 def is_constructor_attribute(attribute): | 570 def is_constructor_attribute(attribute): |
| 571 return attribute.idl_type.name.endswith('Constructor') | 571 return attribute.idl_type.name.endswith('Constructor') |
| 572 | 572 |
| 573 | 573 |
| 574 def is_named_constructor_attribute(attribute): | 574 def is_named_constructor_attribute(attribute): |
| 575 return attribute.idl_type.name.endswith('ConstructorConstructor') | 575 return attribute.idl_type.name.endswith('ConstructorConstructor') |
| 576 | 576 |
| 577 | 577 |
| 578 def update_constructor_attribute_context(interface, attribute, context): | 578 def update_constructor_attribute_context(interface, attribute, context): |
| 579 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 579 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
| OLD | NEW |