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
Родитель fce9a1cf00
Коммит 8790cd9833
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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