Hi, all. I've been trying off and on to figure something out about proxies created in a shadow realm.
Specifically, I've been operating under the assumption that a membrane needs to create a Proxy inside a ShadowRealm to an object outside the realm. The more I look over the ShadowRealm proposal, though, the less I see how that's possible.
You need a ProxyHandler and a (shadow) target in the realm. That handler has to communicate synchronously with something outside the realm in order to support the proxy's traps. The proxy trap needs to get the answer from the outside before it can exit.
Compartments have the same problem.
Alternatively, I could see trusted code passing a proxy into a realm, but the API's for realms seem to disallow that (probably for good reason).
Now I strongly believe that someone out there working on membranes in the ShadowRealm shims has solved this. I keep banging my head on the wall every time I try to conceptually figure this out. Membranes depend on proxies that can communicate synchronously across boundaries. Could someone please send me example code that illustrates how this can happen?
Alex Vincent
Hayward, CA
--
"The first step in confirming there is a bug in someone else's work is confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001