Bug 596996 - -silent and -chrome command line flags are busted in Fennec [r=mbrubeck]
authorMark Finkle <mfinkle@mozilla.com>
Fri, 17 Sep 2010 14:36:37 -0400
changeset 66668 446fd200900d4be65f1216858e14081d3f382271
parent 66667 75473be322cf5815ec6f51615309017a52044f8c
child 66669 c6b26dced0d0c173ca9f85a0f185199de676e02d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs596996
Bug 596996 - -silent and -chrome command line flags are busted in Fennec [r=mbrubeck]
mobile/components/BrowserCLH.js
--- a/mobile/components/BrowserCLH.js
+++ b/mobile/components/BrowserCLH.js
@@ -127,16 +127,17 @@ BrowserCLH.prototype = {
     // this component by using the -silent command line flag, thereby creating
     // the cache during install, not runtime.
     // NOTE: This code assumes this CLH is run before the nsDefaultCLH, which
     // consumes the "-silent" flag.
     if (aCmdLine.findFlag("silent", false) > -1) {
       let searchService = Services.search;
       let autoComplete = Cc["@mozilla.org/autocomplete/search;1?name=history"].
                          getService(Ci.nsIAutoCompleteSearch);
+      return;
     }
 
     // Handle chrome windows loaded via commandline
     let chromeParam = aCmdLine.handleFlagWithParam("chrome", false);
     if (chromeParam) {
       try {
         // Only load URIs which do not inherit chrome privs
         let features = "chrome,dialog=no,all";
@@ -147,16 +148,17 @@ BrowserCLH.prototype = {
 
           // Stop the normal commandline processing from continuing
           aCmdLine.preventDefault = true;
         }
       }
       catch (e) {
         Cu.reportError(e);
       }
+      return;
     }
 
     // Keep an array of possible URL arguments
     let uris = [];
 
     // Check for the "url" flag
     let uriFlag = aCmdLine.handleFlagWithParam("url", false);
     if (uriFlag) {