On 19 July 2012 00:19, Jason Orendorff <jason.orendo...@gmail.com> wrote:

> On Wed, Jul 18, 2012 at 3:31 PM, Brendan Eich <bren...@mozilla.org> wrote:
> > In particular, we don't want a proto-chain walk from [[CanPut]] and a
> second
> > walk from the "has" under the __proto__ setter for
> >
> >   obj.__proto__ = safe; // not in SES code
> >
> > just because we might need the "has" for
> >
> >   evil = Object.getOwnPropertyDescriptor(Object.prototype,
> '__proto__').set;
> >
> >   // later ...
> >
> >   evil.call(victim, unsafe);
> >
> > How would you spec this?
>
> I would spec the desired semantics.  I really don't think we should
> bend the language spec an iota around performance here.
>

I like Jason's suggestion, and I agree that performance should be the least
of all concerns for proto mutation.

(In fact, can we perhaps spec it in a way that guarantees that this
operation is so expensive that it discourages everybody from still using it
in the future? Like, insert a step that says "pause for 10 seconds to
reconsider". :) )

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

Reply via email to