Firefox: this fixes uBlock lingering in memory after disabling it

This commit is contained in:
gorhill 2015-06-23 11:37:44 -04:00
parent 4a1219f723
commit 6c1678d718
2 changed files with 11 additions and 0 deletions

View file

@ -1471,6 +1471,16 @@ exports.restart = function() {
/******************************************************************************/ /******************************************************************************/
// Call when disabling uBlock, to ensure it doesn't stick around as a detached
// window object in Firefox.
exports.shutdown = function() {
suspendUpdateDaemon();
reset();
};
/******************************************************************************/
return exports; return exports;
})(); })();

View file

@ -39,6 +39,7 @@ var µb = µBlock;
vAPI.app.onShutdown = function() { vAPI.app.onShutdown = function() {
µb.staticFilteringReverseLookup.shutdown(); µb.staticFilteringReverseLookup.shutdown();
µb.assetUpdater.shutdown();
µb.staticNetFilteringEngine.reset(); µb.staticNetFilteringEngine.reset();
µb.sessionFirewall.reset(); µb.sessionFirewall.reset();
µb.permanentFirewall.reset(); µb.permanentFirewall.reset();