[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit e1f39122d16e5cd69dd11732d8fb2faf5087fdd2
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
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;
 }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits