Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 'cpp_name': cpp_name(attribute), | 101 'cpp_name': cpp_name(attribute), |
| 102 'cpp_type': idl_type.cpp_type, | 102 '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()'), | 103 '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] | 104 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] |
| 105 'enum_validation_expression': idl_type.enum_validation_expression, | 105 'enum_validation_expression': idl_type.enum_validation_expression, |
| 106 'has_custom_getter': has_custom_getter, | 106 'has_custom_getter': has_custom_getter, |
| 107 'has_custom_setter': has_custom_setter, | 107 'has_custom_setter': has_custom_setter, |
| 108 'has_setter_exception_state': | 108 'has_setter_exception_state': |
| 109 is_setter_raises_exception or has_type_checking_interface or | 109 is_setter_raises_exception or has_type_checking_interface or |
| 110 has_type_checking_nullable or has_type_checking_unrestricted or | 110 has_type_checking_nullable or has_type_checking_unrestricted or |
| 111 idl_type.is_integer_type or idl_type.name == 'ByteString', | 111 idl_type.is_integer_type or idl_type.name in ('ByteString', 'ScalarV alueString'), |
|
Nils Barth (inactive)
2014/06/11 03:54:25
Could you wrap this line?
jsbell
2014/06/12 17:45:55
Done.
| |
| 112 'has_type_checking_interface': has_type_checking_interface, | 112 'has_type_checking_interface': has_type_checking_interface, |
| 113 'has_type_checking_nullable': has_type_checking_nullable, | 113 'has_type_checking_nullable': has_type_checking_nullable, |
| 114 'has_type_checking_unrestricted': has_type_checking_unrestricted, | 114 'has_type_checking_unrestricted': has_type_checking_unrestricted, |
| 115 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType | 115 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType |
| 116 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'), | 116 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'), |
| 117 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'), | 117 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'), |
| 118 'is_check_security_for_node': is_check_security_for_node, | 118 'is_check_security_for_node': is_check_security_for_node, |
| 119 'is_custom_element_callbacks': is_custom_element_callbacks, | 119 'is_custom_element_callbacks': is_custom_element_callbacks, |
| 120 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, | 120 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, |
| 121 'is_getter_raises_exception': # [RaisesException] | 121 'is_getter_raises_exception': # [RaisesException] |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 lambda self: strip_suffix(self.base_type, 'Constructor')) | 422 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 423 | 423 |
| 424 | 424 |
| 425 def is_constructor_attribute(attribute): | 425 def is_constructor_attribute(attribute): |
| 426 # FIXME: replace this with [ConstructorAttribute] extended attribute | 426 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 427 return attribute.idl_type.base_type.endswith('Constructor') | 427 return attribute.idl_type.base_type.endswith('Constructor') |
| 428 | 428 |
| 429 | 429 |
| 430 def generate_constructor_getter(interface, attribute, contents): | 430 def generate_constructor_getter(interface, attribute, contents): |
| 431 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as'] | 431 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as'] |
| OLD | NEW |