| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # coding=utf-8 | 2 # coding=utf-8 |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 def property_setter(setter): | 1018 def property_setter(setter): |
| 1019 idl_type = setter.arguments[1].idl_type | 1019 idl_type = setter.arguments[1].idl_type |
| 1020 extended_attributes = setter.extended_attributes | 1020 extended_attributes = setter.extended_attributes |
| 1021 is_raises_exception = 'RaisesException' in extended_attributes | 1021 is_raises_exception = 'RaisesException' in extended_attributes |
| 1022 return { | 1022 return { |
| 1023 'has_type_checking_interface': | 1023 'has_type_checking_interface': |
| 1024 has_extended_attribute_value(setter, 'TypeChecking', 'Interface') an
d | 1024 has_extended_attribute_value(setter, 'TypeChecking', 'Interface') an
d |
| 1025 idl_type.is_wrapper_type, | 1025 idl_type.is_wrapper_type, |
| 1026 'idl_type': idl_type.base_type, | 1026 'idl_type': idl_type.base_type, |
| 1027 'is_custom': 'Custom' in extended_attributes, | 1027 'is_custom': 'Custom' in extended_attributes, |
| 1028 'has_exception_state': is_raises_exception or | 1028 'has_exception_state': (is_raises_exception or |
| 1029 idl_type.is_integer_type, | 1029 idl_type.v8_conversion_needs_exception_state), |
| 1030 'is_raises_exception': is_raises_exception, | 1030 'is_raises_exception': is_raises_exception, |
| 1031 'name': cpp_name(setter), | 1031 'name': cpp_name(setter), |
| 1032 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( | 1032 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( |
| 1033 extended_attributes, 'v8Value', 'propertyValue'), | 1033 extended_attributes, 'v8Value', 'propertyValue'), |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 | 1036 |
| 1037 def property_deleter(deleter): | 1037 def property_deleter(deleter): |
| 1038 idl_type = deleter.idl_type | 1038 idl_type = deleter.idl_type |
| 1039 if str(idl_type) != 'boolean': | 1039 if str(idl_type) != 'boolean': |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 deleter = next( | 1146 deleter = next( |
| 1147 method | 1147 method |
| 1148 for method in interface.operations | 1148 for method in interface.operations |
| 1149 if ('deleter' in method.specials and | 1149 if ('deleter' in method.specials and |
| 1150 len(method.arguments) == 1 and | 1150 len(method.arguments) == 1 and |
| 1151 str(method.arguments[0].idl_type) == 'DOMString')) | 1151 str(method.arguments[0].idl_type) == 'DOMString')) |
| 1152 except StopIteration: | 1152 except StopIteration: |
| 1153 return None | 1153 return None |
| 1154 | 1154 |
| 1155 return property_deleter(deleter) | 1155 return property_deleter(deleter) |
| OLD | NEW |