On Aug 17, 2011, at 6:52 AM, John-David Dalton wrote:
> 
> Awesome! That was our conclusion too. It was late Kit and I missed
> trying it in other implementations (instead we dug into spec because
> we thought it was odd). It turns out V8 (Chrome, Node.js) has a bug
> that will make non-enumerable properties enumerable by assigning a new
> value as in my previous snippet :O

I suspect that this only applies to builtin properties on objects, as I think 
JSC has a similar issue.

Speaking for JSC (but i wouldn't be surprised if V8 did something similar) we 
will delay the creation of the majority of builtin properties until they're 
actually used, eg. until you actually access Array.prototype.reduce we won't 
reify the property.  A side effect of this is that when you simply assign to 
the property we skip reification, and so the property attributes are the same 
as you would get if you were creating a new property.

A simple test would be to see if
Array.prototype.reduce;
Array.prototype.reduce = ...

Results in the correct behaviour.

--Oliver

> 
> Thanks again,
> JDD
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to