Calling toString on function proxy throws TypeError exception

Mark Miller erights at gmail.com
Thu Oct 22 19:03:59 UTC 2015


Ok, that all makes sense and is fine with me. Thanks for clarifying.

Tom, I'm still curious what you remember?


On Thu, Oct 22, 2015 at 2:59 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>
wrote:

>
> On Oct 22, 2015, at 11:43 AM, Mark S. Miller <erights at google.com> wrote:
>
> I know that's true in general. But we made a few exceptions, especially
> for functions and arrays. I thought F.p.toString was one, but maybe not. I
> just don't remember.
>
>
> There are no such special cases that I’m aware of, and I don’t know how
> they would work. See the proxy [[Call]] internal method
> http://ecma-international.org/ecma-262/6.0/#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist
>
>
> This is basically a coordination issue between the access of a method via
> a proxy [[Get]] and the invocation of the retrieved function via a [[Call].
> Essentially, the creation of a membrane is required to make it work. As I’m
> sure you will recall, we explored using an invoke trap to help deal with
> this sort of situation but eventually abandoned that.  At the time we
> recognized that proxies that only used default handler would not be
> transparent in such situations and decide that it would be ok.
>
> Allen
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
Text by me above is hereby placed in the public domain

  Cheers,
  --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151022/daf7d1ba/attachment-0001.html>


More information about the es-discuss mailing list