From bc3d9da42719727d1f33ffa87b61f20819ffcf00 Mon Sep 17 00:00:00 2001 From: Georg Koppen Date: Wed, 31 May 2017 08:58:30 +0000 Subject: [PATCH] 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 07067cce365f9..425e5709c31b3 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; } -- GitLab