Membranes, unmediated access to objects through Object.getPrototypeOf

Mark S. Miller erights at google.com
Thu Oct 11 10:50:53 PDT 2012


On Thu, Oct 11, 2012 at 10:26 AM, Tom Van Cutsem <tomvc.be at gmail.com> wrote:

> 2012/10/11 Andreas Rossberg <rossberg at google.com>
>
>> On 11 October 2012 13:41, Mark S. Miller <erights at google.com> wrote:
>> > How does the target get dropped? Remember, this all started with David's
>> > observation that without some additional magic, we have an unsolvable GC
>> > problem. This is still true.
>>
>> Ah, right. If revoke also froze the handler object, then it could
>> delete the target, because it will never be observable again. Would
>> that be too magic?
>>
>
> You're assuming that from the handler you can access the proxy with which
> it's associated, but there is no such explicit link. You might keep track
> of the link purely at the implementation level, but then what to do with
> one-to-many relationships as David pointed out.
>
> I think the additional Proxy.revocable constructor is fine. It doesn't
> introduce the combinatorial explosion problem I mentioned earlier for
> branded proxies since Proxy.revocable takes exactly the same arguments as
> the Proxy constructor. Only the return value is different.
>

Agreed on everything but a terminology nit. Proxy.revocable is a function,
not a constructor. The record it returns is not an instanceof
Proxy.revocable.



>
> Cheers,
> Tom
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121011/b9edd239/attachment-0001.html>


More information about the es-discuss mailing list