Slip Ahead Logging

It's not your fault at all.

ES Harmony の WeakMap でキーの列挙ができない理由

Because of references being weak, WeakMap keys are not enumerable (i.e. there is no method giving you a list of the keys). If they were, the list would depend on the state of garbage collection, introducing non-determinism.

https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap

参照がなくなったキーは勝手に GC されて取り除かれるので,キー一覧が取得するメソッドを設けた場合に,そのメソッドを呼ぶタイミング(GC 前か GC 後か)によって,取得されるキー一覧が異なってくる.そのため,こういった非決定的なメソッドは用意しないと.