From 4d8f908022282d2bd89fb2c02728d481a75f727f Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 9 Apr 2015 21:50:23 -0400 Subject: [PATCH] #10: manually imported fixes from https://github.com/AlexVallat/uBlock/commit/e762a29d308caa46578cdc34a9be92c4ad5ecdd0 --- platform/firefox/vapi-background.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 92a1dae..4873d94 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -65,7 +65,11 @@ vAPI.app.restart = function() { var cleanupTasks = []; // This must be updated manually, every time a new task is added/removed -var expectedNumberOfCleanups = 7; + +// Fixed by github.com/AlexVallat: +// https://github.com/AlexVallat/uBlock/commit/7b781248f00cbe3d61b1cc367c440db80fa06049 +// 7 instances of cleanupTasks.push, but one is unique to fennec, and one to desktop. +var expectedNumberOfCleanups = 6; window.addEventListener('unload', function() { for ( var cleanup of cleanupTasks ) {