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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 for attribute in attributes), | 301 for attribute in attributes), |
302 'has_attribute_configuration': any( | 302 'has_attribute_configuration': any( |
303 not (attribute['is_expose_js_accessors'] or | 303 not (attribute['is_expose_js_accessors'] or |
304 attribute['is_static'] or | 304 attribute['is_static'] or |
305 attribute['runtime_enabled_function'] or | 305 attribute['runtime_enabled_function'] or |
306 attribute['per_context_enabled_function']) | 306 attribute['per_context_enabled_function']) |
307 and attribute['should_be_exposed_to_script'] | 307 and attribute['should_be_exposed_to_script'] |
308 for attribute in attributes), | 308 for attribute in attributes), |
309 'has_conditional_attributes': has_conditional_attributes, | 309 'has_conditional_attributes': has_conditional_attributes, |
310 'has_constructor_attributes': any(attribute['constructor_type'] for attr
ibute in attributes), | 310 'has_constructor_attributes': any(attribute['constructor_type'] for attr
ibute in attributes), |
311 'has_replaceable_attributes': any(attribute['is_replaceable'] for attrib
ute in attributes), | 311 'has_replaceable_attributes': any( |
| 312 attribute['is_replaceable'] and |
| 313 not attribute['is_expose_js_accessors'] |
| 314 for attribute in attributes), |
312 }) | 315 }) |
313 | 316 |
314 # Methods | 317 # Methods |
315 methods = [] | 318 methods = [] |
316 if interface.original_interface: | 319 if interface.original_interface: |
317 methods.extend([v8_methods.method_context(interface, operation, is_visib
le=False) | 320 methods.extend([v8_methods.method_context(interface, operation, is_visib
le=False) |
318 for operation in interface.original_interface.operations | 321 for operation in interface.original_interface.operations |
319 if operation.name]) | 322 if operation.name]) |
320 methods.extend([v8_methods.method_context(interface, method) | 323 methods.extend([v8_methods.method_context(interface, method) |
321 for method in interface.operations | 324 for method in interface.operations |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 if str(idl_type) != 'boolean': | 1305 if str(idl_type) != 'boolean': |
1303 raise Exception( | 1306 raise Exception( |
1304 'Only deleters with boolean type are allowed, but type is "%s"' % | 1307 'Only deleters with boolean type are allowed, but type is "%s"' % |
1305 idl_type) | 1308 idl_type) |
1306 extended_attributes = deleter.extended_attributes | 1309 extended_attributes = deleter.extended_attributes |
1307 return { | 1310 return { |
1308 'is_custom': 'Custom' in extended_attributes, | 1311 'is_custom': 'Custom' in extended_attributes, |
1309 'is_raises_exception': 'RaisesException' in extended_attributes, | 1312 'is_raises_exception': 'RaisesException' in extended_attributes, |
1310 'name': cpp_name(deleter), | 1313 'name': cpp_name(deleter), |
1311 } | 1314 } |
OLD | NEW |