This will help get rid of hooks and unify how all the Object Actor are instantiate and registered in their pool.
It will also ease gathering them in specific pools.
Differential Revision: https://phabricator.services.mozilla.com/D224108
All the actors using ActorPool now use Pool instead.
A few changes were needed since the API are a bit different:
- addActor(x) was changed to manage(x)
- removeActor(x) was changed to x.destroy() (which removes x from the Pool)
- x.registeredPool was changed into x.parent() (registeredPool was the Pool x was in)
- conn.addActorPool calls were removed as it's already done in the Pool _poolMap getter
- conn.removeActorPool(x) calls were turned into x.destroy , as the former is called
from Pool#destroy.
Also, some actors were overriding Actor#initialize without calling
Actor.prototype.initialize.call, which mean they didn't have a `conn`
property.
Differential Revision: https://phabricator.services.mozilla.com/D66780