Bug 1646456 - Remove unused noCleanup argument from removeActorPool r=nchevobbe

Depends on D80059

removeActorPool is only called from one spot, which always passes the second optional argument as true.

Differential Revision: https://phabricator.services.mozilla.com/D80060
This commit is contained in:
Julian Descottes 2020-06-22 12:54:26 +00:00
parent b1578fe35a
commit 4006b42e26
2 changed files with 3 additions and 9 deletions

View File

@ -123,11 +123,8 @@ DevToolsServerConnection.prototype = {
*
* @param ActorPool actorPool
* The ActorPool instance you want to remove.
* @param boolean noCleanup [optional]
* True if you don't want to destroy each actor from the pool, false
* otherwise.
*/
removeActorPool(actorPool, noCleanup) {
removeActorPool(actorPool) {
// When a connection is closed, it removes each of its actor pools. When an
// actor pool is removed, it calls the destroy method on each of its
// actors. Some actors, such as ThreadActor, manage their own actor pools.
@ -150,10 +147,7 @@ DevToolsServerConnection.prototype = {
}
const index = this._extraPools.lastIndexOf(actorPool);
if (index > -1) {
const pool = this._extraPools.splice(index, 1);
if (!noCleanup) {
pool.forEach(p => p.destroy());
}
this._extraPools.splice(index, 1);
}
},

View File

@ -190,7 +190,7 @@ class Pool extends EventEmitter {
actor.destroy = destroy;
}
}
this.conn.removeActorPool(this, true);
this.conn.removeActorPool(this);
this.__poolMap.clear();
this.__poolMap = null;
}