[whatwg] Bug in defineProperty
David Bruant
bruant.d at gmail.com
Tue Jan 24 00:58:19 PST 2012
Le 24/01/2012 01:35, Ian Hickson a écrit :
> 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.)
Indeed. The code shown above is not really related to any API defined in
standard HTML living standard.
I can't reproduce the problematic behavior.
Can you (Evgeny Burzak) retry and send the results to
es5-discuss at mozilla.org ?
David
More information about the whatwg
mailing list