Mark S. Miller (2015-06-17T18:14:29.000Z)
d at domenic.me (2015-07-07T01:41:16.941Z)
> On Thu, Jun 18, 2015 at 1:18 AM, Mark S. Miller <erights at google.com> > wrote: > >> [+Allen] >> >> Can registered Symbols be used as keys in WeakMaps? If so, we have a >> fatal unauthorized communications channel that we need to fix in the spec >> asap! It turns out the spec is fine. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap.prototype.set step 5 says > If Type(*key*) is not Object, throw a *TypeError* exception. as I hoped and expected. The reason I was alarmed is that I got the following behavior on v8/iojs: ``` > var w = new WeakMap(); undefined > var r = Symbol.for('foo'); undefined > w.set(r, true); {} > w.get(r) true ``` I will file a v8 bug. Please someone, add a test for this to test262.