Bug 866632 - |cookie list| on about page shows 'no cookies found for host', should use 'No cookies found for this page'; r=harth
authorJoe Walker <jwalker@mozilla.com>
Thu, 09 May 2013 15:15:23 +0100
changeset 131343 e55e6114c0e45bbf4a9af2c1fe96bd6ba98a4d45
parent 131342 4fe015fabb0ccc9814c7cf38c16f37d05fd3b977
child 131344 9ae9cc383d0ff2ad7cb44ed35a366ab8508890b9
push id1594
push userjwalker@mozilla.com
push dateThu, 09 May 2013 14:44:13 +0000
treeherderfx-team@9ae9cc383d0f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersharth
bugs866632
milestone23.0a1
Bug 866632 - |cookie list| on about page shows 'no cookies found for host', should use 'No cookies found for this page'; r=harth
browser/devtools/commandline/BuiltinCommands.jsm
--- a/browser/devtools/commandline/BuiltinCommands.jsm
+++ b/browser/devtools/commandline/BuiltinCommands.jsm
@@ -972,17 +972,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
    */
   gcli.addCommand({
     name: "cookie list",
     description: gcli.lookup("cookieListDesc"),
     manual: gcli.lookup("cookieListManual"),
     returnType: "cookies",
     exec: function Command_cookieList(args, context) {
       let host = context.environment.document.location.host;
-      if (host == null) {
+      if (host == null || host == "") {
         throw new Error(gcli.lookup("cookieListOutNonePage"));
       }
 
       let enm = cookieMgr.getCookiesFromHost(host);
 
       let cookies = [];
       while (enm.hasMoreElements()) {
         let cookie = enm.getNext().QueryInterface(Ci.nsICookie);