| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 # Attributes | 364 # Attributes |
| 365 attributes = [v8_attributes.attribute_context(interface, attribute, interfac
es) | 365 attributes = [v8_attributes.attribute_context(interface, attribute, interfac
es) |
| 366 for attribute in interface.attributes] | 366 for attribute in interface.attributes] |
| 367 | 367 |
| 368 has_conditional_attributes = any(attribute['exposed_test'] for attribute in
attributes) | 368 has_conditional_attributes = any(attribute['exposed_test'] for attribute in
attributes) |
| 369 if has_conditional_attributes and interface.is_partial: | 369 if has_conditional_attributes and interface.is_partial: |
| 370 raise Exception('Conditional attributes between partial interfaces in mo
dules and the original interfaces(%s) in core are not allowed.' % interface.name
) | 370 raise Exception('Conditional attributes between partial interfaces in mo
dules and the original interfaces(%s) in core are not allowed.' % interface.name
) |
| 371 | 371 |
| 372 context.update({ | 372 context.update({ |
| 373 'attributes': attributes, | 373 'attributes': attributes, |
| 374 # Elements in attributes are broken in following members. |
| 375 'accessors': v8_attributes.filter_accessors(attributes), |
| 376 'data_attributes': v8_attributes.filter_data_attributes(attributes), |
| 377 'lazy_data_attributes': v8_attributes.filter_lazy_data_attributes(attrib
utes), |
| 378 'origin_trial_attributes': v8_attributes.filter_origin_trial_enabled(att
ributes), |
| 379 'runtime_enabled_attributes': v8_attributes.filter_runtime_enabled(attri
butes), |
| 374 }) | 380 }) |
| 375 | 381 |
| 376 # Methods | 382 # Methods |
| 377 methods, iterator_method = methods_context(interface) | 383 methods, iterator_method = methods_context(interface) |
| 378 context.update({ | 384 context.update({ |
| 379 'has_origin_safe_method_setter': any(method['is_cross_origin'] and not m
ethod['is_unforgeable'] | 385 'has_origin_safe_method_setter': any(method['is_cross_origin'] and not m
ethod['is_unforgeable'] |
| 380 for method in methods), | 386 for method in methods), |
| 381 'has_private_script': (any(attribute['is_implemented_in_private_script']
for attribute in attributes) or | 387 'has_private_script': (any(attribute['is_implemented_in_private_script']
for attribute in attributes) or |
| 382 any(method['is_implemented_in_private_script'] fo
r method in methods)), | 388 any(method['is_implemented_in_private_script'] fo
r method in methods)), |
| 383 'iterator_method': iterator_method, | 389 'iterator_method': iterator_method, |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 extended_attributes = deleter.extended_attributes | 1489 extended_attributes = deleter.extended_attributes |
| 1484 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1490 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1485 is_ce_reactions = 'CEReactions' in extended_attributes | 1491 is_ce_reactions = 'CEReactions' in extended_attributes |
| 1486 return { | 1492 return { |
| 1487 'is_call_with_script_state': is_call_with_script_state, | 1493 'is_call_with_script_state': is_call_with_script_state, |
| 1488 'is_ce_reactions': is_ce_reactions, | 1494 'is_ce_reactions': is_ce_reactions, |
| 1489 'is_custom': 'Custom' in extended_attributes, | 1495 'is_custom': 'Custom' in extended_attributes, |
| 1490 'is_raises_exception': 'RaisesException' in extended_attributes, | 1496 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1491 'name': cpp_name(deleter), | 1497 'name': cpp_name(deleter), |
| 1492 } | 1498 } |
| OLD | NEW |