Use random number as id in CallbacksRegistry.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 6 Dec 2013 07:04:51 +0000 (15:04 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 6 Dec 2013 07:04:51 +0000 (15:04 +0800)
commit844fccc177791dc206e247bacc14604e2a1a415c
tree394990c7633c990b45a78f4d9e18cf4cf796decd
parent0a63395b0f2a9c1c448d8069f5830d233f84b992
Use random number as id in CallbacksRegistry.

It's very possible that the callbacks got GCed before the render view is
closed (like page getting refreshed), so we should not let browser call
the wrong callback, instead we should throw error whenever a callback is
not found.
common/api/lib/callbacks-registry.coffee