Membranes, unmediated access to objects through Object.getPrototypeOf

David Bruant bruant.d at
Thu Oct 11 04:58:35 PDT 2012

2012/10/11 Andreas Rossberg <rossberg at>

> On 11 October 2012 09:32, Brendan Eich <brendan at> wrote:
> > Tom Van Cutsem wrote:
> >>
> >> - Proxy.revocable returns a tuple {proxy, revoke}. While more cumbersome
> >> to work with (especially in pre-ES6 code without destructuring), this
> >> gets the authority to revoke a proxy exactly right: at proxy birth,
> only the
> >> creator of the proxy holds the right to revoke it. This is infinitely
> better
> >> than a global Proxy.revoke(proxy) method that would allow arbitrary
> objects
> >> to revoke any proxy.
> >
> > Ok, thanks for this recap. It makes sense, the ocap treatments are
> working
> > ;-).
> Even then I don't think the additional creation API is needed. The
> handler itself can be mutable, right?

Yes, but "can" doesn't mean "must".

> So why not have a function
> Proxy.revoke that takes a _handler_ (not a proxy) and replaces all its
> trap methods by poisoned traps?

What about cases where several proxies shared the same handler? Here is an
example of membrane implementation where all proxies of the membrane share
the exact same handler:

Also, as suggested above with "can" and "must", what do you do with frozen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list