Bug 1371263 - Improve about:cache page. r=mayhemer
authorGeorg Koppen <gk@torproject.org>
Fri, 09 Jun 2017 13:56:21 +0200
changeset 411374 ae536496bc6d565a03bfcafa96cbe55c704596a0
parent 411373 46707f69b3aa27a874881824d782f8e8099c472b
child 411375 95ca02ed62c40dc248bebda7c637211d757e3b63
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1371263 - Improve about:cache page. r=mayhemer 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`.
--- a/toolkit/components/aboutcache/content/aboutCache.js
+++ b/toolkit/components/aboutcache/content/aboutCache.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 // First, parse and save the incoming arguments ("?storage=name&context=key")
 // Note: window.location.search doesn't work with nsSimpleURIs used for about:* addresses.
 var search = window.location.href.match(/^.*\?(.*)$/);
 var searchParams = new URLSearchParams(search ? search[1] : "");
-var storage = searchParams.get("storage");
+var storage = searchParams.get("storage") || "";
 var cacheContext = searchParams.get("context");
 // The context is in a format as used by the HTTP cache v2 back end
 if (cacheContext)
   var [context, isAnon, isInBrowser, appId, isPrivate] = cacheContext.match(/(a,)?(b,)?(i\d+,)?(p,)?/);
 if (appId)
   appId = appId.match(/i(\d+),/)[1];