Implementing membranes using proxies, and [[GetInheritance]]
brendan at mozilla.com
Tue Sep 10 23:53:36 PDT 2013
Cc'ing Tom to make sure I tell no lies.
> Boris Zbarsky <mailto:bzbarsky at MIT.EDU>
> September 10, 2013 9:10 PM
> Hey all,
> I was looking at implementing a membrane using ES6 proxies and ran
> into a snag. Consider a situation where object A has prototype B. A'
> is a proxy implementing the membrane, whose target is A.
> But now if Object.getPrototypeOf(A') is invoked the return value will
> be B (unless it just throws). There's no way for A' to return a new
> proxy B' whose target is B in this situation.
> Is the intent here that the membrane should not be using A as its
> target but some third object A''?
This. The target is for nonconfigurable properties. A membrane wants to
hide the real target. See
http://wiki.ecmascript.org/doku.php?id=harmony:direct_proxies (look for
membrane and shadow)
> Or am I just missing something?
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss