W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

Re: WindowProxy as the key in ES6 Set/Map/WeakSet/WeakMap

From: Mark S. Miller <erights@google.com>
Date: Tue, 15 Apr 2014 21:58:17 -0400
Message-ID: <CABHxS9gFdG_w8pF_qyYSiHpzuP-DrfgNnFUPpxnEaSMWvRCodQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Rick Waldron <waldron.rick@gmail.com>, Adam Klein <adamk@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Toon Verwaest <verwaest@chromium.org>, Adam Barth <abarth@chromium.org>
On Tue, Apr 15, 2014 at 5:27 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 4/15/14 5:20 PM, Rick Waldron wrote:
>
>> On Tue, Apr 15, 2014 at 5:04 PM, Adam Klein <adamk@chromium.org
>> <mailto:adamk@chromium.org>> wrote:
>>     Consider a case where a WeakMap is being used, instead of a Map, to
>>     store private state related to an object. Given that expando
>>     properties disappear when a WindowProxy is attached to a different
>>     Window after navigation,
>>
>> Is it still the same object, or a newly created object?
>>
>
> It's the same WindowProxy, but a new Window.


Why should the Map or WeakMap care about the Window? w is a WindowProxy,
and it is still === to itself. I'm with Rick -- I don't get it.



>
>
> -Boris
>
>


-- 
    Cheers,
    --MarkM
Received on Wednesday, 16 April 2014 01:58:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC