Comment #3 on issue 712 by [email protected]: Object.defineProperty allows overriding an accessor with an empty descriptor
http://code.google.com/p/v8/issues/detail?id=712

You are correct. I now see my previous comment 1 was confused. I was reacting only to the lack of a thrown error, which is indeed correct. The outcome we should expect for the original is
    42
    42

The outcome we should expect for your comment 2 case is

    > o.x
    42
    > 'x' in o
    true
    > Object.getOwnPropertyDescriptor(o, 'x')
    configurable: false
    enumerable: false
    get: function() { return 42; }
    set: undefined

so the actual behavior is indeed very wrong.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to