| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if is_constructor_attribute(attribute) else None, | 88 if is_constructor_attribute(attribute) else None, |
| 89 'cpp_name': cpp_name(attribute), | 89 'cpp_name': cpp_name(attribute), |
| 90 'cpp_type': idl_type.cpp_type, | 90 'cpp_type': idl_type.cpp_type, |
| 91 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] | 91 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] |
| 92 'enum_validation_expression': idl_type.enum_validation_expression, | 92 'enum_validation_expression': idl_type.enum_validation_expression, |
| 93 'has_custom_getter': has_custom_getter, | 93 'has_custom_getter': has_custom_getter, |
| 94 'has_custom_setter': has_custom_setter, | 94 'has_custom_setter': has_custom_setter, |
| 95 'has_strict_type_checking': has_strict_type_checking, | 95 'has_strict_type_checking': has_strict_type_checking, |
| 96 'idl_type': str(idl_type), # need trailing [] on array for Dictionary::
ConversionContext::setConversionType | 96 'idl_type': str(idl_type), # need trailing [] on array for Dictionary::
ConversionContext::setConversionType |
| 97 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va
lue(attribute, 'CallWith', 'ExecutionContext'), | 97 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va
lue(attribute, 'CallWith', 'ExecutionContext'), |
| 98 'is_call_with_new_script_state': v8_utilities.has_extended_attribute_val
ue(attribute, 'CallWith', 'NewScriptState'), |
| 98 'is_check_security_for_node': is_check_security_for_node, | 99 'is_check_security_for_node': is_check_security_for_node, |
| 99 'is_custom_element_callbacks': is_custom_element_callbacks, | 100 'is_custom_element_callbacks': is_custom_element_callbacks, |
| 100 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, | 101 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, |
| 101 'is_getter_raises_exception': ( # [RaisesException] | 102 'is_getter_raises_exception': ( # [RaisesException] |
| 102 'RaisesException' in extended_attributes and | 103 'RaisesException' in extended_attributes and |
| 103 extended_attributes['RaisesException'] in [None, 'Getter']), | 104 extended_attributes['RaisesException'] in [None, 'Getter']), |
| 104 'is_initialized_by_event_constructor': | 105 'is_initialized_by_event_constructor': |
| 105 'InitializedByEventConstructor' in extended_attributes, | 106 'InitializedByEventConstructor' in extended_attributes, |
| 106 'is_keep_alive_for_gc': is_keep_alive_for_gc(interface, attribute), | 107 'is_keep_alive_for_gc': is_keep_alive_for_gc(interface, attribute), |
| 107 'is_nullable': attribute.idl_type.is_nullable, | 108 'is_nullable': attribute.idl_type.is_nullable, |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 lambda self: strip_suffix(self.base_type, 'Constructor')) | 405 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 405 | 406 |
| 406 | 407 |
| 407 def is_constructor_attribute(attribute): | 408 def is_constructor_attribute(attribute): |
| 408 # FIXME: replace this with [ConstructorAttribute] extended attribute | 409 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 409 return attribute.idl_type.base_type.endswith('Constructor') | 410 return attribute.idl_type.base_type.endswith('Constructor') |
| 410 | 411 |
| 411 | 412 |
| 412 def generate_constructor_getter(interface, attribute, contents): | 413 def generate_constructor_getter(interface, attribute, contents): |
| 413 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 414 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
| OLD | NEW |