Array.isArray(new Proxy([], {})) should be false (Bug 1096753)

Andrea Giammarchi andrea.giammarchi at gmail.com
Thu Nov 13 04:34:56 PST 2014


Same would be reassigning any prototype but it was just to make the
diabolic point... also yeah, sPO is powerful, that's why we love it!

( it's also way less diabolic than any "__proto__" string floating around
;) )

On Thu, Nov 13, 2014 at 11:44 AM, Andreas Rossberg <rossberg at google.com>
wrote:

> On 13 November 2014 12:25, Andrea Giammarchi
> <andrea.giammarchi at gmail.com> wrote:
> > well, Proxy can be a diabolic beast
> >
> > ```js
> > Object.setPrototypeOf(
> >   Object.prototype,
> >   new Proxy(Object.prototype, evilPlan)
> > )
> > ```
> >
> > having no way to understand if an object is a Proxy looks like a footgun
> to
> > me in the long term, for libraries, and "code alchemists"
>
> Well, the actual diabolic beast and universal foot gun in this example
> is setPrototypeOf. ;)
>
> /Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141113/8e042220/attachment.html>


More information about the es-discuss mailing list