.entries() vs. the web

Oliver Hunt oliver at apple.com
Mon Jun 16 16:13:17 PDT 2014

@@unscopeable doesn't work as they are not using |with|

The logic is something along the lines of 

if (foo.entries) ...

It looks like there are paths that objects or arrays may path through, with "entries" being a perfectly reasonable property name in the object case, but now the array case hits the entries property on Array.prototype


> On Jun 16, 2014, at 4:10 PM, Erik Arvidsson <erik.arvidsson at gmail.com> wrote:
> That is why you need to implement @unscopables too.
> On Jun 16, 2014 7:08 PM, "Oliver Hunt" <oliver at apple.com> wrote:
> It turns out there are a number of sites (such as mobile.twitter.com) that are property detecting .entries on objects, and that means that they're breaking when Array.prototype.entries is provided.
> We're removing it from JSC now, until we can find a way to expose it without causing site breakage, although this does seem like fixing it would require bringing back the awful "pretend that you're undefined" horror.
> --Oliver
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140616/965c1584/attachment-0001.html>

More information about the es-discuss mailing list