Bug 1465635 - Prevent netmonitor from destroying all "close" event listeners. r=jdescottes

Depends on D16874

Differential Revision: https://phabricator.services.mozilla.com/D17609

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2019-02-02 11:24:12 +00:00
parent ef1c99b06e
commit f2180fa200

View File

@ -129,12 +129,13 @@ class FirefoxConnector {
async removeListeners() {
if (this.tabTarget) {
this.tabTarget.off("close");
this.tabTarget.off("close", this.disconnect);
}
if (this.webConsoleClient) {
this.webConsoleClient.off("networkEvent");
this.webConsoleClient.off("networkEventUpdate");
this.webConsoleClient.off("docEvent");
this.webConsoleClient.off("networkEvent", this.dataProvider.onNetworkEvent);
this.webConsoleClient.off("networkEventUpdate",
this.dataProvider.onNetworkEventUpdate);
this.webConsoleClient.off("docEvent", this.onDocEvent);
}
}