[whatwg] Bug in defineProperty

Hello,

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
Safari: not tested
Opera: failed
Firefox: nothing - right job

-Evgeny

Received on Thursday, 4 August 2011 06:26:17 UTC