diff --git a/lib/persistentRndStorage.js b/lib/persistentRndStorage.js index ecd3971..21aa1d2 100644 --- a/lib/persistentRndStorage.js +++ b/lib/persistentRndStorage.js @@ -89,15 +89,6 @@ }; }(); - browser.windows.onRemoved.addListener(async function(){ - const windows = await browser.windows.getAll(); - if (windows.every(function(window){ - return !window.incognito; - })){ - clearIncognito(); - } - }); - function registerTimeout(){ const interval = getInterval(); if (interval > 0){ @@ -173,4 +164,18 @@ scope.setDomainData = setDomainData; scope.clearDomainData = clearDomainData; scope.clearContainerData = clearContainerData; + + try { + browser.windows.onRemoved.addListener(async function(){ + const windows = await browser.windows.getAll(); + if (windows.every(function(window){ + return !window.incognito; + })){ + clearIncognito(); + } + }); + } + catch (error){ + logging.error("Unable to register windows.onRemoved listener", error); + } }()); \ No newline at end of file diff --git a/releaseNotes.txt b/releaseNotes.txt index 8c25264..554ff99 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -7,6 +7,7 @@ Version 1.10: fixes: - always protect about:blank + - persistent rng not working in Firefox for Android known issues: - if a data URL is blocked the page action button does not appear