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

On Wed, Apr 16, 2014 at 7:30 AM, Adam Barth <abarth@chromium.org> wrote:

> On Wed, Apr 16, 2014 at 7:25 AM, Domenic Denicola <
> domenic@domenicdenicola.com> wrote:
>
>> On Apr 16, 2014, at 10:14, "Adam Barth" <abarth@chromium.org> wrote:
>> > I don't believe there's an experiment you can run today in browsers to
>> answer that question.  Map would give you a way to answer that question,
>> which is why we need to decide what the answer ought to be.
>>
>> Map is entirely implementable in today's JavaScript, modulo efficiency
>> concerns. So I don't see how this could be true. The answer should be
>> whatever such a JS Map implementation does.
>>
>
> Hum...  In that case, I think we need to act as if the identity of the
> WindowProxy is preserved across browsing context navigations.
>

 I, too, find this argument pretty convincing. And though I think it makes
a little less sense for WeakMap (due to the use case of WeakMaps as private
names), but consistency between all the different containers is likely
worthwhile.

- Adam

Received on Thursday, 17 April 2014 20:09:21 UTC