| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (base_idl_type == 'EventHandler' and | 87 if (base_idl_type == 'EventHandler' and |
| 88 interface.name in ['Window', 'WorkerGlobalScope'] and | 88 interface.name in ['Window', 'WorkerGlobalScope'] and |
| 89 attribute.name == 'onerror'): | 89 attribute.name == 'onerror'): |
| 90 includes.add('bindings/v8/V8ErrorHandler.h') | 90 includes.add('bindings/v8/V8ErrorHandler.h') |
| 91 | 91 |
| 92 contents = { | 92 contents = { |
| 93 'access_control_list': access_control_list(attribute), | 93 'access_control_list': access_control_list(attribute), |
| 94 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_
world_list(attribute, 'Getter'), # [ActivityLogging] | 94 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_
world_list(attribute, 'Getter'), # [ActivityLogging] |
| 95 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_
world_list(attribute, 'Setter'), # [ActivityLogging] | 95 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_
world_list(attribute, 'Setter'), # [ActivityLogging] |
| 96 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e
xtended_attributes, # [ActivityLogging] | 96 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e
xtended_attributes, # [ActivityLogging] |
| 97 'activity_logging_world_check': v8_utilities.activity_logging_world_chec
k(attribute), # [ActivityLogging] |
| 97 'cached_attribute_validation_method': extended_attributes.get('CachedAtt
ribute'), | 98 'cached_attribute_validation_method': extended_attributes.get('CachedAtt
ribute'), |
| 98 'conditional_string': v8_utilities.conditional_string(attribute), | 99 'conditional_string': v8_utilities.conditional_string(attribute), |
| 99 'constructor_type': idl_type.constructor_type_name | 100 'constructor_type': idl_type.constructor_type_name |
| 100 if is_constructor_attribute(attribute) else None, | 101 if is_constructor_attribute(attribute) else None, |
| 101 'cpp_name': cpp_name(attribute), | 102 'cpp_name': cpp_name(attribute), |
| 102 'cpp_type': idl_type.cpp_type, | 103 'cpp_type': idl_type.cpp_type, |
| 103 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='origi
nal', creation_context='info.Holder()'), | 104 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='origi
nal', creation_context='info.Holder()'), |
| 104 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] | 105 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] |
| 105 'enum_validation_expression': idl_type.enum_validation_expression, | 106 'enum_validation_expression': idl_type.enum_validation_expression, |
| 106 'has_custom_getter': has_custom_getter, | 107 'has_custom_getter': has_custom_getter, |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 lambda self: strip_suffix(self.base_type, 'Constructor')) | 423 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 423 | 424 |
| 424 | 425 |
| 425 def is_constructor_attribute(attribute): | 426 def is_constructor_attribute(attribute): |
| 426 # FIXME: replace this with [ConstructorAttribute] extended attribute | 427 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 427 return attribute.idl_type.base_type.endswith('Constructor') | 428 return attribute.idl_type.base_type.endswith('Constructor') |
| 428 | 429 |
| 429 | 430 |
| 430 def generate_constructor_getter(interface, attribute, contents): | 431 def generate_constructor_getter(interface, attribute, contents): |
| 431 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 432 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
| OLD | NEW |