Bug 1206491 - Fix a JavaScript error in about:cache page. r=mayhemmer
authorYFdyh000 <yfdyh000@gmail.com>
Sun, 20 Sep 2015 04:36:00 +0200
changeset 263652 6b9e4e20ce0620ed3cefbe1e61b442b9ca702502
parent 263651 16727f8bf69bdc2102234ae7740619c2ebcc85cf
child 263653 ca26b0e7cd5276464e3a8bc7851898e6eed442f9
push id65393
push usercbook@mozilla.com
push dateTue, 22 Sep 2015 07:30:07 +0000
treeherdermozilla-inbound@ca26b0e7cd52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemmer
bugs1206491
milestone44.0a1
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 1206491 - Fix a JavaScript error in about:cache page. r=mayhemmer
toolkit/components/aboutcache/content/aboutCache.js
--- a/toolkit/components/aboutcache/content/aboutCache.js
+++ b/toolkit/components/aboutcache/content/aboutCache.js
@@ -5,17 +5,18 @@
 // 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 context = searchParams.get('context');
 
 // The context is in a format as used by the HTTP cache v2 back end
-var [context, isAnon, isInBrowser, appId, isPrivate] = context.match(/(a,)?(b,)?(i\d+,)?(p,)?/);
+if (context)
+  var [context, isAnon, isInBrowser, appId, isPrivate] = context.match(/(a,)?(b,)?(i\d+,)?(p,)?/);
 if (appId)
   appId = appId.match(/i(\d+),/)[1];
 
 
 function $(id) { return document.getElementById(id) || {}; }
 
 // Initialize the context UI controls at the start according what we got in the "context=" argument
 addEventListener('DOMContentLoaded', function() {