Status: New
Owner: ----
New issue 2383 by [email protected]: assignment to index property fails
to fail when property on prototype is non-writable
http://code.google.com/p/v8/issues/detail?id=2383
var foo = {};
var proto = {};
foo.__proto__ = proto;
Object.defineProperty(proto, 'str', { writable: false, value: 'fixed' });
foo.str = 'changed';
foo.str; // 'fixed', i.e. rejects the [[Put]]
Object.defineProperty(proto, '0', { writable: false, value: 'fixed' });
foo[0] = 'changed';
foo[0]; // 'changed', i.e. the property was set on the local object.
[FYI, index properties appear to the do the right thing with accessors on
the prototype]
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev