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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( | 1292 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( |
1293 extended_attributes, 'v8Value', 'propertyValue', restricted_float=re
stricted_float), | 1293 extended_attributes, 'v8Value', 'propertyValue', restricted_float=re
stricted_float), |
1294 } | 1294 } |
1295 | 1295 |
1296 | 1296 |
1297 def property_deleter(deleter): | 1297 def property_deleter(deleter): |
1298 if not deleter: | 1298 if not deleter: |
1299 return None | 1299 return None |
1300 | 1300 |
1301 idl_type = deleter.idl_type | 1301 idl_type = deleter.idl_type |
1302 if str(idl_type) != 'boolean': | |
1303 raise Exception( | |
1304 'Only deleters with boolean type are allowed, but type is "%s"' % | |
1305 idl_type) | |
1306 extended_attributes = deleter.extended_attributes | 1302 extended_attributes = deleter.extended_attributes |
1307 return { | 1303 return { |
1308 'is_custom': 'Custom' in extended_attributes, | 1304 'is_custom': 'Custom' in extended_attributes, |
1309 'is_raises_exception': 'RaisesException' in extended_attributes, | 1305 'is_raises_exception': 'RaisesException' in extended_attributes, |
1310 'name': cpp_name(deleter), | 1306 'name': cpp_name(deleter), |
1311 } | 1307 } |
OLD | NEW |