Re: [].push wrt properties along the [[Prototype]] chain

2013-02-19 Thread Kevin Reid
On Fri, Feb 15, 2013 at 5:30 PM, Jeff Walden wrote: > Consider: > > Object.defineProperty(Object.prototype, "0", { value: 17, writable: > false, configurable: false }); > [].push(42); > > Per ES5, I think this is supposed to throw a TypeError. The push should > be setting property "0" with T

Re: [].push wrt properties along the [[Prototype]] chain

2013-02-17 Thread Norbert Lindenberg
Using Jeff's tests, I don't see exceptions being thrown in any of these browsers: IE 9 and the current versions of Safari on Mac/iOS, Firefox/Chrome/Opera on Mac/Windows. I don't have IE 10. I also checked the tests in directory 15.4.4.7 of Test262; they don't cover these cases. Adding non-wri

Re: [].push wrt properties along the [[Prototype]] chain

2013-02-16 Thread Allen Wirfs-Brock
On Feb 16, 2013, at 11:57 AM, Mark S. Miller wrote: > Allen, by "put:", did you mean "set:"? > arrrggg. to much vacation. yes, of course, it should be "set" in which case the exception does occur as it should in FF. Allen > > On Sat, Feb 16, 2013 at 10:51 AM, Allen Wir

Re: [].push wrt properties along the [[Prototype]] chain

2013-02-16 Thread Mark S. Miller
Allen, by "put:", did you mean "set:"? On Sat, Feb 16, 2013 at 10:51 AM, Allen Wirfs-Brock wrote: > > On Feb 15, 2013, at 6:30 PM, Jeff Walden wrote: > > Consider: > > Object.defineProperty(Object.prototype, "0", { value: 17, writable: > false, configurable: false }); > [].push(42); > > Per ES

Re: [].push wrt properties along the [[Prototype]] chain

2013-02-16 Thread Allen Wirfs-Brock
On Feb 15, 2013, at 6:30 PM, Jeff Walden wrote: > Consider: > > Object.defineProperty(Object.prototype, "0", { value: 17, writable: false, > configurable: false }); > [].push(42); > > Per ES5, I think this is supposed to throw a TypeError. The push should be > setting property "0" with Thr

[].push wrt properties along the [[Prototype]] chain

2013-02-15 Thread Jeff Walden
Consider: Object.defineProperty(Object.prototype, "0", { value: 17, writable: false, configurable: false }); [].push(42); Per ES5, I think this is supposed to throw a TypeError. The push should be setting property "0" with Throw = true, which means that when [[CanPut]] fails, a TypeError