mozilla / positron

a experimental, Electron-compatible runtime on top of Gecko
Other
564 stars 64 forks source link

define IDWeakMap methods on its prototype #47

Closed mykmelez closed 8 years ago

mykmelez commented 8 years ago

@marcoscaceres The only difference from your suggested implementation is that set doesn't return this, because the upstream implementation doesn't do that:

https://github.com/electron/electron/blob/v0.37.8/atom/common/api/atom_api_id_weak_map.cc#L21-L25

marcoscaceres commented 8 years ago

r+ from me. It's not great that this doesn't follow the WeakMap API behaviour, but it's ok given that it's just internal.