Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: Source/bindings/scripts/v8_utilities.py

Issue 1185843010: bindings: Moves custom getters/setters to the prototype chain. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 member.is_static or 461 member.is_static or
462 is_unforgeable(interface, member) or 462 is_unforgeable(interface, member) or
463 'OverrideBuiltins' in interface.extended_attributes): 463 'OverrideBuiltins' in interface.extended_attributes):
464 return False 464 return False
465 465
466 # TODO(yukishiino): We should handle [Global] and [PrimaryGlobal] instead of 466 # TODO(yukishiino): We should handle [Global] and [PrimaryGlobal] instead of
467 # Window. 467 # Window.
468 if (interface.name == 'Window'): 468 if (interface.name == 'Window'):
469 return member.idl_type.name == 'EventHandler' 469 return member.idl_type.name == 'EventHandler'
470 470
471 # TODO(yukishiino): We should move all of the following members to prototype
472 # chains.
473 if 'Custom' in member.extended_attributes:
474 return False
475
476 if 'ExposeJSAccessors' in interface.extended_attributes: 471 if 'ExposeJSAccessors' in interface.extended_attributes:
477 return True 472 return True
478 if 'DoNotExposeJSAccessors' in interface.extended_attributes: 473 if 'DoNotExposeJSAccessors' in interface.extended_attributes:
479 return False 474 return False
480 475
481 return True 476 return True
482 477
483 478
484 # static, const 479 # static, const
485 def on_interface(interface, member): 480 def on_interface(interface, member):
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 except StopIteration: 584 except StopIteration:
590 return None 585 return None
591 586
592 587
593 IdlInterface.indexed_property_getter = property(indexed_property_getter) 588 IdlInterface.indexed_property_getter = property(indexed_property_getter)
594 IdlInterface.indexed_property_setter = property(indexed_property_setter) 589 IdlInterface.indexed_property_setter = property(indexed_property_setter)
595 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) 590 IdlInterface.indexed_property_deleter = property(indexed_property_deleter)
596 IdlInterface.named_property_getter = property(named_property_getter) 591 IdlInterface.named_property_getter = property(named_property_getter)
597 IdlInterface.named_property_setter = property(named_property_setter) 592 IdlInterface.named_property_setter = property(named_property_setter)
598 IdlInterface.named_property_deleter = property(named_property_deleter) 593 IdlInterface.named_property_deleter = property(named_property_deleter)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/templates/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698