Closed arv closed 8 years ago
@johnjbarton PTAL
The motivation for finally doing this is that I want to get rid of our createPrivateName
and replace all of those with weak maps.
This does not handle non extensible/frozen objects but we can update to support that and or just switch to core-js (see issue #1976).
LGTM, though using eg corejs is attractive from the maintenance viewpoint.
I realized this was still pending. I added support for frozen keys (which have to be strongly held) as well as fixed few issues regarding non object keys.
PTAL.
TODO: Handle the case where a key gets added and then later gets frozen...
I thought more about the case where a key is later frozen. It gets complicated and I don't think it is worth supporting at this point.
Uses an expando on the key
Issue #898