[tor-commits] [tor-browser/tor-browser-52.1.0esr-7.0-2] Bug 16485: Improve about:cache page

gk at torproject.org gk at torproject.org
Fri Jun 2 08:44:26 UTC 2017


commit 9607f989206d048c9905d1b19cedf9913750c6c7
Author: Georg Koppen <gk at torproject.org>
Date:   Wed May 31 08:58:30 2017 +0000

    Bug 16485: Improve about:cache page
    
    Loading `about:cache` and selecting particular caches via the checkboxes
    results in a cryptic error ("Unrecognized storage name 'null' in
    about:cache URL) when updating the page. We avoid that by making sure
    the storage parameter is in fact empty if it is supposed to be `null`.
---
 toolkit/components/aboutcache/content/aboutCache.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/toolkit/components/aboutcache/content/aboutCache.js b/toolkit/components/aboutcache/content/aboutCache.js
index 07067cc..425e570 100644
--- a/toolkit/components/aboutcache/content/aboutCache.js
+++ b/toolkit/components/aboutcache/content/aboutCache.js
@@ -40,5 +40,13 @@ function navigate()
   if ($('priv').checked)
     context += 'p,';
 
+  // Checking any of the checkboxes and hitting "Update" after `about:cache` got
+  // loaded should not result in a cryptic error ("Unrecognized storage name
+  // 'null' in about:cache URL"). Rather, the related list of entries in all
+  // caches should be made visible.
+  if (storage == null) {
+    storage=""
+  }
+
   window.location.href = 'about:cache?storage=' + storage + '&context=' + context;
 }



More information about the tor-commits mailing list