Created attachment 215559 [details] Desired Use Case in the Inspector For the Inspector, we want to start using WeakMap for our event listener and dispatch base Object prototype. However, WeakMap can't be enumerated at all, unlike Map. I understand this is a design decision baked into ES6. But it really limits the uses to WeakMap.
I believe the spec folks objected based on the fact that iteration would make GC behavior observable. I'm not sure I agree with that objection. Given that a WebKit-only client would use WeakMap iteration, it might be worth implementing even if other browsers don't implement it.
Lets do it then!
(In reply to comment #1) > I believe the spec folks objected based on the fact that iteration would make GC behavior observable. I'm not sure I agree with that objection. Given that a WebKit-only client would use WeakMap iteration, it might be worth implementing even if other browsers don't implement it. Yes, my plan was to make this a privileged API (In reply to comment #2) > Lets do it then! Would you be okay with a magical "get an array of entries" style API? (This simplifies the semantics dramatically)
Any API would do. We would need the key and value pairs.