Calling toString on function proxy throws TypeError exception
Mark S. Miller
erights at google.com
Thu Oct 22 18:43:26 UTC 2015
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
On Thu, Oct 22, 2015 at 2:36 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>
> On Oct 22, 2015, at 11:23 AM, Mark S. Miller <erights at google.com> wrote:
> Tom, this doesn't sound right to me. Didn't we intend Function.prototype.toString
> to be transparent thru function proxies?
> cc'ing Allen and Brian
> There is nothing unique to `toString` going on there. This is just the
> problem that the default proxy handlers are not transparent across method
> calls in that they pass the proxy object rather than the target object as
> the `this` value to function that they ultimately invoke. If that method
> needs to access internal slots of its `this` value or has `this` identify
> dependencies they don’t work. It turns out that most Function.prototype
> methods have such dependencies.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss