Proxying built-ins (Was: [[Invoke]] and implicit method calls)

Boris Zbarsky bzbarsky at MIT.EDU
Thu Sep 26 08:36:57 PDT 2013

On 9/26/13 5:16 AM, Tom Van Cutsem wrote:
> I believe the crucial part of why this works is because the built-ins
> can recognize trusted, cross-realm proxies, from arbitrary other proxies.

Yes, agreed.

> Answering MarkM's question of whether we can self-host such behavior, I
> believe we can:
> ```js
> var trustedMembraneProxies = new WeakMap(); // maps trusted membrane
> proxies to their target, allowing code with access to this WeakMap to
> unwrap them

Ah, and another weakmap for the per-property security checks.  Yes, I 
guess that would work.


More information about the es-discuss mailing list