Updates:
Status: Accepted
Owner: [email protected]
Comment #4 on issue 687 by [email protected]: Object.defineProperty
problems with redefining accessor properties in some situations.
http://code.google.com/p/v8/issues/detail?id=687
Test case 2 actually does the right thing (although the error message is a
bit odd I will give you that). Since you are providing a property
descriptor to the call to Object.create this will be used when creating the
x property. Because you give no specification of the configurable property
of the descriptor this will default to false, and it is, therefore, not
possible to override it. If you add "configurable: true: to the property
descriptor everything works as you expect.
As peter writes, case 3 can be reproduced by his example (although there
will be no stack overflow). What happens is that the call to
Object.defineProperty will make actually call the set accessor, which again
will call Object.defineProperty, which again will call ........
I have a fix for this and will submit it soon
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev