Disconnect actors by default when removing an actor pool (bug 992244). r=dcamp

This commit is contained in:
Panos Astithas 2014-04-08 10:23:00 +03:00
parent 4684c38acf
commit f1c1de83dc
3 changed files with 6 additions and 6 deletions

View File

@ -726,7 +726,7 @@ TabActor.prototype = {
this.conn.removeActorPool(this._tabPool);
this._tabPool = null;
if (this._tabActorPool) {
this.conn.removeActorPool(this._tabActorPool, true);
this.conn.removeActorPool(this._tabActorPool);
this._tabActorPool = null;
}

View File

@ -983,15 +983,15 @@ DebuggerServerConnection.prototype = {
*
* @param ActorPool aActorPool
* The ActorPool instance you want to remove.
* @param boolean aCleanup
* True if you want to disconnect each actor from the pool, false
* @param boolean aNoCleanup [optional]
* True if you don't want to disconnect each actor from the pool, false
* otherwise.
*/
removeActorPool: function DSC_removeActorPool(aActorPool, aCleanup) {
removeActorPool: function DSC_removeActorPool(aActorPool, aNoCleanup) {
let index = this._extraPools.lastIndexOf(aActorPool);
if (index > -1) {
let pool = this._extraPools.splice(index, 1);
if (aCleanup) {
if (!aNoCleanup) {
pool.map(function(p) { p.cleanup(); });
}
}

View File

@ -736,7 +736,7 @@ let Pool = Class({
actor.destroy = destroy;
}
};
this.conn.removeActorPool(this);
this.conn.removeActorPool(this, true);
this.__poolMap.clear();
this.__poolMap = null;
},