| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 return CONTENT_ATTRIBUTE_GETTER_NAMES[base_idl_type] | 358 return CONTENT_ATTRIBUTE_GETTER_NAMES[base_idl_type] |
| 359 if 'URL' in attribute.extended_attributes: | 359 if 'URL' in attribute.extended_attributes: |
| 360 return 'GetURLAttribute' | 360 return 'GetURLAttribute' |
| 361 return 'FastGetAttribute' | 361 return 'FastGetAttribute' |
| 362 | 362 |
| 363 | 363 |
| 364 def is_keep_alive_for_gc(interface, attribute): | 364 def is_keep_alive_for_gc(interface, attribute): |
| 365 idl_type = attribute.idl_type | 365 idl_type = attribute.idl_type |
| 366 base_idl_type = idl_type.base_type | 366 base_idl_type = idl_type.base_type |
| 367 extended_attributes = attribute.extended_attributes | 367 extended_attributes = attribute.extended_attributes |
| 368 if attribute.is_static: |
| 369 return False |
| 368 return ( | 370 return ( |
| 369 # For readonly attributes, for performance reasons we keep the attribute | 371 # For readonly attributes, for performance reasons we keep the attribute |
| 370 # wrapper alive while the owner wrapper is alive, because the attribute | 372 # wrapper alive while the owner wrapper is alive, because the attribute |
| 371 # never changes. | 373 # never changes. |
| 372 (attribute.is_read_only and | 374 (attribute.is_read_only and |
| 373 idl_type.is_wrapper_type and | 375 idl_type.is_wrapper_type and |
| 374 # There are some exceptions, however: | 376 # There are some exceptions, however: |
| 375 not( | 377 not( |
| 376 # Node lifetime is managed by object grouping. | 378 # Node lifetime is managed by object grouping. |
| 377 inherits_interface(interface.name, 'Node') or | 379 inherits_interface(interface.name, 'Node') or |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 def is_constructor_attribute(attribute): | 577 def is_constructor_attribute(attribute): |
| 576 return attribute.idl_type.name.endswith('Constructor') | 578 return attribute.idl_type.name.endswith('Constructor') |
| 577 | 579 |
| 578 | 580 |
| 579 def is_named_constructor_attribute(attribute): | 581 def is_named_constructor_attribute(attribute): |
| 580 return attribute.idl_type.name.endswith('ConstructorConstructor') | 582 return attribute.idl_type.name.endswith('ConstructorConstructor') |
| 581 | 583 |
| 582 | 584 |
| 583 def update_constructor_attribute_context(interface, attribute, context): | 585 def update_constructor_attribute_context(interface, attribute, context): |
| 584 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 586 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
| OLD | NEW |