| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 not (attribute['is_static'] or | 291 not (attribute['is_static'] or |
| 292 attribute['runtime_enabled_function']) and | 292 attribute['runtime_enabled_function']) and |
| 293 attribute['should_be_exposed_to_script'] | 293 attribute['should_be_exposed_to_script'] |
| 294 for attribute in attributes), | 294 for attribute in attributes), |
| 295 'has_attribute_configuration': any( | 295 'has_attribute_configuration': any( |
| 296 not (attribute['is_expose_js_accessors'] or | 296 not (attribute['is_expose_js_accessors'] or |
| 297 attribute['is_static'] or | 297 attribute['is_static'] or |
| 298 attribute['runtime_enabled_function']) | 298 attribute['runtime_enabled_function']) |
| 299 and attribute['should_be_exposed_to_script'] | 299 and attribute['should_be_exposed_to_script'] |
| 300 for attribute in attributes), | 300 for attribute in attributes), |
| 301 'has_conditional_attributes': has_conditional_attributes, | |
| 302 'has_constructor_attributes': any(attribute['constructor_type'] for attr
ibute in attributes), | 301 '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), | 302 'has_replaceable_attributes': any(attribute['is_replaceable'] for attrib
ute in attributes), |
| 304 }) | 303 }) |
| 305 | 304 |
| 306 # Methods | 305 # Methods |
| 307 methods = [] | 306 methods = [] |
| 308 if interface.original_interface: | 307 if interface.original_interface: |
| 309 methods.extend([v8_methods.method_context(interface, operation, is_visib
le=False) | 308 methods.extend([v8_methods.method_context(interface, operation, is_visib
le=False) |
| 310 for operation in interface.original_interface.operations | 309 for operation in interface.original_interface.operations |
| 311 if operation.name]) | 310 if operation.name]) |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 'has_origin_safe_method_setter': any( | 552 'has_origin_safe_method_setter': any( |
| 554 method['is_check_security_for_frame'] and not method['is_read_only'] | 553 method['is_check_security_for_frame'] and not method['is_read_only'] |
| 555 for method in methods), | 554 for method in methods), |
| 556 'has_private_script': any(attribute['is_implemented_in_private_script']
for attribute in attributes) or | 555 'has_private_script': any(attribute['is_implemented_in_private_script']
for attribute in attributes) or |
| 557 any(method['is_implemented_in_private_script'] for method in methods
), | 556 any(method['is_implemented_in_private_script'] for method in methods
), |
| 558 'iterator_method': iterator_method, | 557 'iterator_method': iterator_method, |
| 559 'method_configuration_methods': method_configuration_methods, | 558 'method_configuration_methods': method_configuration_methods, |
| 560 'methods': methods, | 559 'methods': methods, |
| 561 }) | 560 }) |
| 562 | 561 |
| 562 # Conditionally enabled members |
| 563 has_conditional_attributes_on_instance = any( |
| 564 attribute['exposed_test'] and attribute['on_instance'] |
| 565 for attribute in attributes) |
| 566 has_conditional_attributes_on_prototype = any( |
| 567 attribute['exposed_test'] and attribute['on_prototype'] |
| 568 for attribute in attributes) |
| 569 context.update({ |
| 570 'has_conditional_attributes_on_instance': |
| 571 has_conditional_attributes_on_instance, |
| 572 'has_conditional_attributes_on_prototype': |
| 573 has_conditional_attributes_on_prototype, |
| 574 }) |
| 575 |
| 563 context.update({ | 576 context.update({ |
| 564 'indexed_property_getter': property_getter(interface.indexed_property_ge
tter, ['index']), | 577 'indexed_property_getter': property_getter(interface.indexed_property_ge
tter, ['index']), |
| 565 'indexed_property_setter': property_setter(interface.indexed_property_se
tter, interface), | 578 'indexed_property_setter': property_setter(interface.indexed_property_se
tter, interface), |
| 566 'indexed_property_deleter': property_deleter(interface.indexed_property_
deleter), | 579 'indexed_property_deleter': property_deleter(interface.indexed_property_
deleter), |
| 567 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, | 580 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, |
| 568 'named_property_getter': property_getter(interface.named_property_getter
, ['propertyName']), | 581 'named_property_getter': property_getter(interface.named_property_getter
, ['propertyName']), |
| 569 'named_property_setter': property_setter(interface.named_property_setter
, interface), | 582 'named_property_setter': property_setter(interface.named_property_setter
, interface), |
| 570 'named_property_deleter': property_deleter(interface.named_property_dele
ter), | 583 'named_property_deleter': property_deleter(interface.named_property_dele
ter), |
| 571 }) | 584 }) |
| 572 | 585 |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 | 1355 |
| 1343 extended_attributes = deleter.extended_attributes | 1356 extended_attributes = deleter.extended_attributes |
| 1344 idl_type = deleter.idl_type | 1357 idl_type = deleter.idl_type |
| 1345 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1358 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1346 return { | 1359 return { |
| 1347 'is_call_with_script_state': is_call_with_script_state, | 1360 'is_call_with_script_state': is_call_with_script_state, |
| 1348 'is_custom': 'Custom' in extended_attributes, | 1361 'is_custom': 'Custom' in extended_attributes, |
| 1349 'is_raises_exception': 'RaisesException' in extended_attributes, | 1362 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1350 'name': cpp_name(deleter), | 1363 'name': cpp_name(deleter), |
| 1351 } | 1364 } |
| OLD | NEW |