On Tue, Sep 10, 2013 at 1:23 AM, Jason Orendorff
<jason.orendo...@gmail.com>wrote:

> On Mon, Sep 9, 2013 at 4:50 PM, Allen Wirfs-Brock <al...@wirfs-brock.com>
> wrote:
> > I'll take a look at it.  My first reaction is that this sounds like a
> good idea.
>
> A lot more can be found by searching for [[Call]]:
> - the call to @@toPrimitive from ToPrimitive (in 7.1.1)
> - the call to @@hasInstance from instanceofOperator (in 12.8.1)
> - the call to .toISOString from Date.prototype.toJSON (in 20.3.4.37)
> - the call to .join from Array.prototype.toString (in 22.1.3.27)
> - the call to .set from the Map constructor (in 23.1.1.1)
> - the call to .add from the Set constructor (in 23.2.1.1)
>
> and at that point I stopped looking.
>
>
When implementing the [[Invoke]] trap in SpiderMonkey, I went with the
assumption that it should apply to all calls of the forms `receiver.fun()`
and `receiver["fun"]()`. Jason pointed out that `with (receiver) { fun() }`
should be caught, too. Doing anything else would make for a surprising
restriction of proxies' capabilities compared to manually overriding
methods, IMO.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to