W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] Bug in defineProperty

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 24 Jan 2012 00:35:04 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1201240033510.16982@ps20323.dreamhostps.com>
On Thu, 4 Aug 2011, Evgeny Burzak wrote:
> 
> It seems there is a bug in function Object.defineProperty.
> When property was defined with enumerable descriptor = false, I can
> anyway get it in iterator if was defined prop with the same name in
> object prototype.
> Almost all browsers affected , except for Firefox. Maybe this happened
> due to ambiguous definition?
> 
> Test
> 
> function test() {Object.defineProperty(this, "a", {value : "b",
>                                writable : true,
>                                enumerable : false,
>                                configurable : true});
> }
> test.prototype.a = "c"
> t = new test()
> for(x in t) console.log([x, t[x]])
> 
> Results
> 
> IE9: a,b
> Chrome: a,b
> Opera: failed
> Firefox: nothing - right job

It's not clear to me which spec this feedback is intended for. Could you 
elaborate on which specification you would like to change for this? (It 
may be that this is the wrong mailing list.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 23 January 2012 16:35:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:10 UTC