| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 do_not_check_security = extended_attributes['DoNotCheckSecurity'] | 447 do_not_check_security = extended_attributes['DoNotCheckSecurity'] |
| 448 if do_not_check_security == 'Setter': | 448 if do_not_check_security == 'Setter': |
| 449 access_control.append('v8::ALL_CAN_WRITE') | 449 access_control.append('v8::ALL_CAN_WRITE') |
| 450 else: | 450 else: |
| 451 access_control.append('v8::ALL_CAN_READ') | 451 access_control.append('v8::ALL_CAN_READ') |
| 452 if (not attribute.is_read_only or | 452 if (not attribute.is_read_only or |
| 453 'Replaceable' in extended_attributes): | 453 'Replaceable' in extended_attributes): |
| 454 access_control.append('v8::ALL_CAN_WRITE') | 454 access_control.append('v8::ALL_CAN_WRITE') |
| 455 if 'Unforgeable' in extended_attributes: | 455 if 'Unforgeable' in extended_attributes: |
| 456 access_control.append('v8::PROHIBITS_OVERWRITING') | 456 access_control.append('v8::PROHIBITS_OVERWRITING') |
| 457 if 'Unintercept' in extended_attributes: |
| 458 access_control.append('v8::PROHIBITS_INTERCEPT | v8::DEFAULT') |
| 457 return access_control or ['v8::DEFAULT'] | 459 return access_control or ['v8::DEFAULT'] |
| 458 | 460 |
| 459 | 461 |
| 460 # [NotEnumerable], [Unforgeable] | 462 # [NotEnumerable], [Unforgeable] |
| 461 def property_attributes(attribute): | 463 def property_attributes(attribute): |
| 462 extended_attributes = attribute.extended_attributes | 464 extended_attributes = attribute.extended_attributes |
| 463 property_attributes_list = [] | 465 property_attributes_list = [] |
| 464 if ('NotEnumerable' in extended_attributes or | 466 if ('NotEnumerable' in extended_attributes or |
| 465 is_constructor_attribute(attribute)): | 467 is_constructor_attribute(attribute)): |
| 466 property_attributes_list.append('v8::DontEnum') | 468 property_attributes_list.append('v8::DontEnum') |
| (...skipping 11 matching lines...) Expand all Loading... |
| 478 lambda self: strip_suffix(self.base_type, 'Constructor')) | 480 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 479 | 481 |
| 480 | 482 |
| 481 def is_constructor_attribute(attribute): | 483 def is_constructor_attribute(attribute): |
| 482 # FIXME: replace this with [ConstructorAttribute] extended attribute | 484 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 483 return attribute.idl_type.base_type.endswith('Constructor') | 485 return attribute.idl_type.base_type.endswith('Constructor') |
| 484 | 486 |
| 485 | 487 |
| 486 def constructor_getter_context(interface, attribute, context): | 488 def constructor_getter_context(interface, attribute, context): |
| 487 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 489 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
| OLD | NEW |