diff --git a/toolkit/devtools/server/actors/webbrowser.js b/toolkit/devtools/server/actors/webbrowser.js index f2385735d654..e6677d411b16 100644 --- a/toolkit/devtools/server/actors/webbrowser.js +++ b/toolkit/devtools/server/actors/webbrowser.js @@ -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; } diff --git a/toolkit/devtools/server/main.js b/toolkit/devtools/server/main.js index 5d48dd388d29..9f98c8289287 100644 --- a/toolkit/devtools/server/main.js +++ b/toolkit/devtools/server/main.js @@ -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(); }); } } diff --git a/toolkit/devtools/server/protocol.js b/toolkit/devtools/server/protocol.js index 68cb7cd6ec53..c476d4768c3a 100644 --- a/toolkit/devtools/server/protocol.js +++ b/toolkit/devtools/server/protocol.js @@ -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; },