Suppress the EventEmitter's warning for ObjectsRegistry.

It's possible that many objects subscribed to it.
This commit is contained in:
Cheng Zhao 2013-12-15 16:15:18 +08:00
parent aa3e8385df
commit cc5db4dab9

View file

@ -41,6 +41,8 @@ class ObjectsStore
class ObjectsRegistry extends EventEmitter class ObjectsRegistry extends EventEmitter
constructor: -> constructor: ->
@setMaxListeners Number.MAX_VALUE
# Objects in weak map will be not referenced (so we won't leak memory), and # Objects in weak map will be not referenced (so we won't leak memory), and
# every object created in browser will have a unique id in weak map. # every object created in browser will have a unique id in weak map.
@objectsWeakMap = new IDWeakMap @objectsWeakMap = new IDWeakMap