Suppress the EventEmitter's warning for ObjectsRegistry.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 15 Dec 2013 08:15:18 +0000 (16:15 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 15 Dec 2013 08:15:18 +0000 (16:15 +0800)
It's possible that many objects subscribed to it.

browser/lib/objects-registry.coffee

index df2ad53..12063fe 100644 (file)
@@ -41,6 +41,8 @@ class ObjectsStore
 
 class ObjectsRegistry extends EventEmitter
   constructor: ->
+    @setMaxListeners Number.MAX_VALUE
+
     # 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.
     @objectsWeakMap = new IDWeakMap