| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 attributes = [v8_attributes.attribute_context(interface, attribute) | 281 attributes = [v8_attributes.attribute_context(interface, attribute) |
| 282 for attribute in interface.attributes] | 282 for attribute in interface.attributes] |
| 283 | 283 |
| 284 has_conditional_attributes = any(attribute['exposed_test'] for attribute in
attributes) | 284 has_conditional_attributes = any(attribute['exposed_test'] for attribute in
attributes) |
| 285 if has_conditional_attributes and interface.is_partial: | 285 if has_conditional_attributes and interface.is_partial: |
| 286 raise Exception('Conditional attributes between partial interfaces in mo
dules and the original interfaces(%s) in core are not allowed.' % interface.name
) | 286 raise Exception('Conditional attributes between partial interfaces in mo
dules and the original interfaces(%s) in core are not allowed.' % interface.name
) |
| 287 | 287 |
| 288 context.update({ | 288 context.update({ |
| 289 'attributes': attributes, | 289 'attributes': attributes, |
| 290 'has_accessor_configuration': any( | 290 'has_accessor_configuration': any( |
| 291 attribute['is_expose_js_accessors'] and | 291 not (attribute['exposed_test'] or |
| 292 not (attribute['is_static'] or | |
| 293 attribute['runtime_enabled_function']) and | 292 attribute['runtime_enabled_function']) and |
| 293 not attribute['is_data_type_property'] and |
| 294 attribute['should_be_exposed_to_script'] | 294 attribute['should_be_exposed_to_script'] |
| 295 for attribute in attributes), | 295 for attribute in attributes), |
| 296 'has_attribute_configuration': any( | 296 'has_attribute_configuration': any( |
| 297 not (attribute['is_expose_js_accessors'] or | 297 not (attribute['exposed_test'] or |
| 298 attribute['is_static'] or | 298 attribute['runtime_enabled_function']) and |
| 299 attribute['runtime_enabled_function']) | 299 attribute['is_data_type_property'] and |
| 300 and attribute['should_be_exposed_to_script'] | 300 attribute['should_be_exposed_to_script'] |
| 301 for attribute in attributes), | 301 for attribute in attributes), |
| 302 'has_constructor_attributes': any(attribute['constructor_type'] for attr
ibute in attributes), | 302 'has_constructor_attributes': any(attribute['constructor_type'] for attr
ibute in attributes), |
| 303 'has_replaceable_attributes': any(attribute['is_replaceable'] for attrib
ute in attributes), | 303 'has_replaceable_attributes': any(attribute['is_replaceable'] for attrib
ute in attributes), |
| 304 }) | 304 }) |
| 305 | 305 |
| 306 # Methods | 306 # Methods |
| 307 methods = [] | 307 methods = [] |
| 308 if interface.original_interface: | 308 if interface.original_interface: |
| 309 methods.extend([v8_methods.method_context(interface, operation, is_visib
le=False) | 309 methods.extend([v8_methods.method_context(interface, operation, is_visib
le=False) |
| 310 for operation in interface.original_interface.operations | 310 for operation in interface.original_interface.operations |
| 311 if operation.name]) | 311 if operation.name]) |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 | 1356 |
| 1357 extended_attributes = deleter.extended_attributes | 1357 extended_attributes = deleter.extended_attributes |
| 1358 idl_type = deleter.idl_type | 1358 idl_type = deleter.idl_type |
| 1359 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1359 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1360 return { | 1360 return { |
| 1361 'is_call_with_script_state': is_call_with_script_state, | 1361 'is_call_with_script_state': is_call_with_script_state, |
| 1362 'is_custom': 'Custom' in extended_attributes, | 1362 'is_custom': 'Custom' in extended_attributes, |
| 1363 'is_raises_exception': 'RaisesException' in extended_attributes, | 1363 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1364 'name': cpp_name(deleter), | 1364 'name': cpp_name(deleter), |
| 1365 } | 1365 } |
| OLD | NEW |