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: Domenic Denicola <domenic@domenicdenicola.com>
Date: Wed, 16 Apr 2014 13:57:27 +0000
To: Adam Barth <abarth@chromium.org>, "Mark S. Miller" <erights@google.com>
CC: Toon Verwaest <verwaest@chromium.org>, Rick Waldron <waldron.rick@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, Adam Klein <adamk@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <63a46d9792814b51ae2b0015fe3ec7ff@BN1PR05MB325.namprd05.prod.outlook.com>
Let’s put it this way; perhaps what Mark’s saying will be clearer.

Given:

```js
const m = new Map();
m.set(windowProxyInstance, "foo");
```

(and given that nothing else is added to `m`), then `m.get(x) === "foo"` should be true _if and only if_ SameValueZero(x, windowProxyInstance) is true (which in this case reduces to `x === windowProxyInstance`).

Window proxies should do nothing to violate this invariant of `Map`s.

With that in mind, is there something special about window proxies that would allow them to abide by this invariant but still run into the questions and problems stated in this thread?

Received on Wednesday, 16 April 2014 13:57:59 UTC

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