Template site objects and WeakMap
utatane.tea at gmail.com
Wed Jun 17 16:31:51 UTC 2015
On Thu, Jun 18, 2015 at 1:18 AM, Mark S. Miller <erights at google.com> wrote:
> 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!
Why do registered Symbols appear? (oops, maybe I missed some context...)
User exposed WeakMap only accepts objects as a key.
In an inverted per-object table implementation, I've talked in this
Now, because iteration and clear method are dropped, we can implement
WeakMap as an inverted per-object table instead of Ephemerons.
The last implementation example shows that my "converting
realm.[[tempateMap]] into WeakMap" proposal can be implemented even if the
WeakMap is implemented as an inverted per-object table.
Of course, if we take an inverted per-object table, private symbols should
be treated specially in the implementation :)
1. we need to carefully extend the object with private symbols even if the
object is frozen.
2. private symbols' lookup system should not be trapped by ES6 Proxy.
3. private symbols should not be exposed to users.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss