Bug 1080302 (part 2) - Convert all mentions of -foo options to --foo options in comments, help messages and error messages. r=glandium.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 23 Oct 2014 17:35:27 -0700
changeset 236727 cb44ac1b1f1ee093f7f15ae586e69d113db1c2e3
parent 236726 a02e1ebafc1394abe817f4ea260345e972dd2447
child 236728 e0354403d6958f0e71a0191919faf97944c3eacf
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1080302
milestone36.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 1080302 (part 2) - Convert all mentions of -foo options to --foo options in comments, help messages and error messages. r=glandium.
b2g/components/OopCommandLine.js
b2g/gaia/run-b2g.c
browser/base/content/browser.js
browser/base/content/test/general/browser_bug520538.js
browser/base/content/test/general/browser_save_private_link_perwindowpb.js
browser/components/nsBrowserContentHandler.js
browser/components/shell/nsSetDefaultBrowser.js
browser/devtools/devtools-clhandler.js
browser/devtools/webide/components/webideCli.js
browser/metro/components/BrowserCLH.js
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
docshell/base/nsDocShell.cpp
layout/tools/recording/recording-cmdline.js
layout/tools/reftest/reftest-cmdline.js
services/sync/tps/extensions/tps/components/tps-cmdline.js
toolkit/components/commandlines/nsICommandLine.idl
toolkit/components/commandlines/nsICommandLineHandler.idl
toolkit/components/console/jsconsole-clhandler.js
toolkit/mozapps/update/updater/updater.cpp
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
webapprt/mac/webapprt.mm
webapprt/win/webapprt.cpp
widget/windows/winrt/MetroContracts.cpp
xpfe/test/winopen.js
--- a/b2g/components/OopCommandLine.js
+++ b/b2g/components/OopCommandLine.js
@@ -34,14 +34,14 @@ oopCommandlineHandler.prototype = {
             } catch (e) { }
 
         }
         if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
             cmdLine.preventDefault = true;
         }
     },
 
-    helpInfo: "  -oop         Use out-of-process model in B2G\n",
+    helpInfo: "  --oop        Use out-of-process model in B2G\n",
     classID: Components.ID("{e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e}"),
     QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([oopCommandlineHandler]);
--- a/b2g/gaia/run-b2g.c
+++ b/b2g/gaia/run-b2g.c
@@ -30,18 +30,20 @@ int main(int argc, char* argv[], char* e
     full_profile_path = (char*) malloc(strlen(cwd) + strlen(GAIA_PATH) + 2);
     if (!full_profile_path) {
         error(NOMEM);
         return -2;
     }
     sprintf(full_path, "%s/%s", cwd, B2G_NAME);
     sprintf(full_profile_path, "%s/%s", cwd, GAIA_PATH);
     free(cwd);
-    printf("Running: %s -profile %s\n", full_path, full_profile_path);
+    printf("Running: %s --profile %s\n", full_path, full_profile_path);
     fflush(stdout);
     fflush(stderr);
+    // XXX: yes, the printf above says --profile and this execle uses -profile.
+    // Bug 1088430 will change the execle to use --profile.
     execle(full_path, full_path, "-profile", full_profile_path, NULL, envp);
     error("unable to start");
     perror(argv[0]);
     free(full_path);
     free(full_profile_path);
     return -1;
 }
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4254,17 +4254,17 @@ nsBrowserAccess.prototype = {
     return browser;
   },
 
   openURI: function (aURI, aOpener, aWhere, aContext) {
     var newWindow = null;
     var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
 
     if (isExternal && aURI && aURI.schemeIs("chrome")) {
-      dump("use -chrome command-line option to load external chrome urls\n");
+      dump("use --chrome command-line option to load external chrome urls\n");
       return null;
     }
 
     if (aWhere == Ci.nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW) {
       if (isExternal &&
           gPrefService.prefHasUserValue("browser.link.open_newwindow.override.external"))
         aWhere = gPrefService.getIntPref("browser.link.open_newwindow.override.external");
       else
--- a/browser/base/content/test/general/browser_bug520538.js
+++ b/browser/base/content/test/general/browser_bug520538.js
@@ -1,15 +1,15 @@
 function test() {
   var tabCount = gBrowser.tabs.length;
   gBrowser.selectedBrowser.focus();
   browserDOMWindow.openURI(makeURI("about:blank"),
                            null,
                            Ci.nsIBrowserDOMWindow.OPEN_NEWTAB,
                            Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
   is(gBrowser.tabs.length, tabCount + 1,
-     "'-new-tab about:blank' opens a new tab");
+     "'--new-tab about:blank' opens a new tab");
   is(gBrowser.selectedTab, gBrowser.tabs[tabCount],
-     "'-new-tab about:blank' selects the new tab");
+     "'--new-tab about:blank' selects the new tab");
   is(document.activeElement, gURLBar.inputField,
-     "'-new-tab about:blank' focuses the location bar");
+     "'--new-tab about:blank' focuses the location bar");
   gBrowser.removeCurrentTab();
 }
--- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
@@ -87,17 +87,17 @@ function test() {
       // Select "Save Image As" option from context menu
       var saveVideoCommand = aWindow.document.getElementById("context-saveimage");
       saveVideoCommand.doCommand();
 
       event.target.hidePopup();
     }
 
     aWindow.gBrowser.addEventListener("pageshow", function pageShown(event) {
-      // If data: -url PAC file isn't loaded soon enough, we may get about:privatebrowsing loaded
+      // If data: --url PAC file isn't loaded soon enough, we may get about:privatebrowsing loaded
       if (event.target.location == "about:blank" ||
           event.target.location == "about:privatebrowsing") {
         aWindow.gBrowser.selectedBrowser.loadURI(testURI);
         return;
       }
       aWindow.gBrowser.removeEventListener("pageshow", pageShown);
 
       waitForFocus(function () {
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -43,17 +43,17 @@ const NS_ERROR_ABORT = Components.result
 const URI_INHERITS_SECURITY_CONTEXT = Components.interfaces.nsIHttpProtocolHandler
                                         .URI_INHERITS_SECURITY_CONTEXT;
 
 function shouldLoadURI(aURI) {
   if (aURI && !aURI.schemeIs("chrome"))
     return true;
 
   dump("*** Preventing external load of chrome: URI into browser window\n");
-  dump("    Use -chrome <uri> instead\n");
+  dump("    Use --chrome <uri> instead\n");
   return false;
 }
 
 function resolveURIInternal(aCmdLine, aArgument) {
   var uri = aCmdLine.resolveURI(aArgument);
   var urifixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
                            .getService(nsIURIFixup);
 
@@ -451,26 +451,26 @@ nsBrowserContentHandler.prototype = {
 
         searchParam = param.substr(2);
         doSearch(searchParam, cmdLine);
       }
     }
 #endif
   },
 
-  helpInfo : "  -browser           Open a browser window.\n" +
-             "  -new-window  <url> Open <url> in a new window.\n" +
-             "  -new-tab     <url> Open <url> in a new tab.\n" +
-             "  -private-window <url> Open <url> in a new private window.\n" +
+  helpInfo : "  --browser          Open a browser window.\n" +
+             "  --new-window <url> Open <url> in a new window.\n" +
+             "  --new-tab <url>    Open <url> in a new tab.\n" +
+             "  --private-window <url> Open <url> in a new private window.\n" +
 #ifdef XP_WIN
-             "  -preferences       Open Options dialog.\n" +
+             "  --preferences      Open Options dialog.\n" +
 #else
-             "  -preferences       Open Preferences dialog.\n" +
+             "  --preferences      Open Preferences dialog.\n" +
 #endif
-             "  -search     <term> Search <term> with your default search engine.\n",
+             "  --search <term>    Search <term> with your default search engine.\n",
 
   /* nsIBrowserHandler */
 
   get defaultArgs() {
     var prefb = Components.classes["@mozilla.org/preferences-service;1"]
                           .getService(nsIPrefBranch);
 
     if (!gFirstWindow) {
--- a/browser/components/shell/nsSetDefaultBrowser.js
+++ b/browser/components/shell/nsSetDefaultBrowser.js
@@ -1,14 +1,14 @@
 /* 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/. */
 
 /* 
- * -setDefaultBrowser commandline handler
+ * --setDefaultBrowser commandline handler
  * Makes the current executable the "default browser".
  */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function nsSetDefaultBrowser() {}
@@ -17,15 +17,15 @@ nsSetDefaultBrowser.prototype = {
   handle: function nsSetDefault_handle(aCmdline) {
     if (aCmdline.handleFlag("setDefaultBrowser", false)) {
       var shell = Cc["@mozilla.org/browser/shell-service;1"].
                   getService(Ci.nsIShellService);
       shell.setDefaultBrowser(true, true);
     }
   },
 
-  helpInfo: "  -setDefaultBrowser Set this app as the default browser.\n",
+  helpInfo: "  --setDefaultBrowser Set this app as the default browser.\n",
 
   classID: Components.ID("{F57899D0-4E2C-4ac6-9E29-50C736103B0C}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSetDefaultBrowser]);
--- a/browser/devtools/devtools-clhandler.js
+++ b/browser/devtools/devtools-clhandler.js
@@ -62,16 +62,16 @@ devtoolsCommandlineHandler.prototype = {
       dump(errorMsg + "\n");
     }
 
     if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
       cmdLine.preventDefault = true;
     }
   },
 
-  helpInfo : "  -jsconsole         Open the Browser Console.\n" +
-             "  -jsdebugger        Open the Browser Toolbox.\n",
+  helpInfo : "  --jsconsole        Open the Browser Console.\n" +
+             "  --jsdebugger       Open the Browser Toolbox.\n",
 
   classID: Components.ID("{9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([devtoolsCommandlineHandler]);
--- a/browser/devtools/webide/components/webideCli.js
+++ b/browser/devtools/webide/components/webideCli.js
@@ -5,33 +5,33 @@
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 
 /**
- * Handles -webide command line option.
+ * Handles --webide command line option.
  */
 
 function webideCli() { }
 
 webideCli.prototype = {
   handle: function(cmdLine) {
     let param;
 
     if (!cmdLine.handleFlag("webide", false)) {
       return;
     }
 
-    // If -webide is used remotely, we don't want to open
+    // If --webide is used remotely, we don't want to open
     // a new tab.
     //
-    // If -webide is used for a new Firefox instance, we
+    // If --webide is used for a new Firefox instance, we
     // want to open webide only.
     cmdLine.preventDefault = true;
 
     let win = Services.wm.getMostRecentWindow("devtools:webide");
     if (win) {
       win.focus();
     } else {
       win = Services.ww.openWindow(null,
--- a/browser/metro/components/BrowserCLH.js
+++ b/browser/metro/components/BrowserCLH.js
@@ -132,20 +132,20 @@ BrowserCLH.prototype = {
   handle: function fs_handle(aCmdLine) {
 #ifdef DEBUG
     for (var idx = 0; idx <  aCmdLine.length; idx++) {
       dump(aCmdLine.getArgument(idx) + "\n");
     }
 #endif
     // Instantiate the search service so the search engine cache is created now
     // instead when the application is running. The install process will register
-    // this component by using the -silent command line flag, thereby creating
+    // 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.
+    // 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
--- a/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
+++ b/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
@@ -611,17 +611,17 @@ void LaunchDesktopBrowserWithParams(CStr
     // Fallback to the module path if it failed to get the default browser.
     GetDefaultBrowserPath(aBrowserPath);
     params += "-url ";
     params += "\"";
     params += aTarget;
     params += "\"";
   }
 
-  // Tack on any extra parameters we received (for example -profilemanager)
+  // Tack on any extra parameters we received (for example --profilemanager)
   if (!aParameters.IsEmpty()) {
     params += " ";
     params += aParameters;
   }
 
   Log(L"Desktop Launch: verb:'%s' exe:'%s' params:'%s'", aVerb, aBrowserPath, params);
 
   // Relaunch in Desktop mode uses a special URL to trick Windows into
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9637,17 +9637,17 @@ nsDocShell::InternalLoad(nsIURI * aURI,
         }
     }
 
     // Before going any further vet loads initiated by external programs.
     if (aLoadType == LOAD_NORMAL_EXTERNAL) {
         // Disallow external chrome: loads targetted at content windows
         bool isChrome = false;
         if (NS_SUCCEEDED(aURI->SchemeIs("chrome", &isChrome)) && isChrome) {
-            NS_WARNING("blocked external chrome: url -- use '-chrome' option");
+            NS_WARNING("blocked external chrome: url -- use '--chrome' option");
             return NS_ERROR_FAILURE;
         }
 
         // clear the decks to prevent context bleed-through (bug 298255)
         rv = CreateAboutBlankContentViewer(nullptr, nullptr);
         if (NS_FAILED(rv))
             return NS_ERROR_FAILURE;
 
--- a/layout/tools/recording/recording-cmdline.js
+++ b/layout/tools/recording/recording-cmdline.js
@@ -62,13 +62,13 @@ RecordingCmdLineHandler.prototype =
 
         var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
                                .getService(nsIWindowWatcher);
         wwatch.openWindow(null, "chrome://recording/content/recording.xul", "_blank",
                           "chrome,dialog=no,all", args);
         cmdLine.preventDefault = true;
     },
 
-    helpInfo : "  -recording <file>  Record drawing for a given URL.\n" +
-               "  -recording-output <file> Specify destination file for a drawing recording.\n"
+    helpInfo : "  --recording <file> Record drawing for a given URL.\n" +
+               "  --recording-output <file> Specify destination file for a drawing recording.\n"
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RecordingCmdLineHandler]);
--- a/layout/tools/reftest/reftest-cmdline.js
+++ b/layout/tools/reftest/reftest-cmdline.js
@@ -100,12 +100,12 @@ RefTestCmdLineHandler.prototype =
         dummy.focus();
         loadReftests();
       }
     }
 
     cmdLine.preventDefault = true;
   },
 
-  helpInfo : "  -reftest <file>    Run layout acceptance tests on given manifest.\n"
+  helpInfo : "  --reftest <file>   Run layout acceptance tests on given manifest.\n"
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RefTestCmdLineHandler]);
--- a/services/sync/tps/extensions/tps/components/tps-cmdline.js
+++ b/services/sync/tps/extensions/tps/components/tps-cmdline.js
@@ -67,19 +67,19 @@ TPSCmdLineHandler.prototype = {
     Components.utils.import("resource://tps/tps.jsm");
     Components.utils.import("resource://tps/quit.js", TPS);
     let uri = cmdLine.resolveURI(uristr).spec;
     TPS.RunTestPhase(uri, phase, logfile, options);
 
     //cmdLine.preventDefault = true;
   },
 
-  helpInfo : "  -tps <file>               Run TPS tests with the given test file.\n" +
-             "  -tpsphase <phase>         Run the specified phase in the TPS test.\n" +
-             "  -tpslogfile <file>        Logfile for TPS output.\n" +
+  helpInfo : "  --tps <file>              Run TPS tests with the given test file.\n" +
+             "  --tpsphase <phase>        Run the specified phase in the TPS test.\n" +
+             "  --tpslogfile <file>       Logfile for TPS output.\n" +
              "  --ignore-unused-engines   Don't load engines not used in tests.\n",
 };
 
 
 var TPSCmdLineFactory = {
   createInstance : function(outer, iid) {
     if (outer != null) {
       throw new Error(Components.results.NS_ERROR_NO_AGGREGATION);
--- a/toolkit/components/commandlines/nsICommandLine.idl
+++ b/toolkit/components/commandlines/nsICommandLine.idl
@@ -11,17 +11,17 @@ interface nsIDOMWindow;
 /**
  * Represents the command line used to invoke a XUL application. This may be the
  * original command-line of this instance, or a command line remoted from another
  * instance of the application.
  *
  * DEFINITIONS:
  * "arguments" are any values found on the command line.
  * "flags" are switches. In normalized form they are preceded by a single dash.
- * Some flags may take "parameters", e.g. "-url <param>" or "-install-xpi <param>"
+ * Some flags may take "parameters", e.g. "--url <param>".
  */
 
 [scriptable, uuid(bc3173bd-aa46-46a0-9d25-d9867a9659b6)]
 interface nsICommandLine : nsISupports
 {
   /**
    * Number of arguments in the command line. The application name is not
    * part of the command line.
--- a/toolkit/components/commandlines/nsICommandLineHandler.idl
+++ b/toolkit/components/commandlines/nsICommandLineHandler.idl
@@ -38,16 +38,16 @@ interface nsICommandLineHandler : nsISup
    *
    * @throw NS_ERROR_ABORT to immediately cease command-line handling
    *        (if this is STATE_INITIAL_LAUNCH, quits the app).
    *        All other exceptions are silently ignored.
    */
   void handle(in nsICommandLine aCommandLine);
 
   /**
-   * When the app is launched with the -help argument, this attribute
+   * When the app is launched with the --help argument, this attribute
    * is retrieved and displayed to the user (on stdout). The text should
    * have embedded newlines which wrap at 76 columns, and should include
    * a newline at the end. By convention, the right column which contains flag
    * descriptions begins at the 24th character.
    */
   readonly attribute AUTF8String helpInfo;
 };
--- a/toolkit/components/console/jsconsole-clhandler.js
+++ b/toolkit/components/console/jsconsole-clhandler.js
@@ -26,15 +26,15 @@ jsConsoleHandler.prototype = {
     } else {
       console.focus(); // the Error console was already open
     }
 
     if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO)
       cmdLine.preventDefault = true;
   },
 
-  helpInfo : "  -jsconsole         Open the Error console.\n",
+  helpInfo : "  --jsconsole        Open the Error console.\n",
 
   classID: Components.ID("{2cd0c310-e127-44d0-88fc-4435c9ab4d4b}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([jsConsoleHandler]);
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -2180,17 +2180,17 @@ UpdateThreadFunc(void *param)
     // updater application again in order to apply the update without
     // staging.
     // The MOZ_NO_REPLACE_FALLBACK environment variable is used to
     // bypass this fallback, and is used in the updater tests.
     // The only special thing which we should do here is to remove the
     // staged directory as it won't be useful any more.
     ensure_remove_recursive(gWorkingDirPath);
     WriteStatusFile(sUsingService ? "pending-service" : "pending");
-    putenv(const_cast<char*>("MOZ_PROCESS_UPDATES=")); // We need to use -process-updates again in the tests
+    putenv(const_cast<char*>("MOZ_PROCESS_UPDATES=")); // We need to use --process-updates again in the tests
     reportRealResults = false; // pretend success
   }
 
   if (reportRealResults) {
     if (rv) {
       LOG(("failed: %d", rv));
     }
     else {
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -486,17 +486,17 @@ CheckArg(const char* aArg, bool aCheckOS
 
     ++curarg;
   }
 
   if (aCheckOSInt && ar == ARG_FOUND) {
     ArgResult arOSInt = CheckArg("osint");
     if (arOSInt == ARG_FOUND) {
       ar = ARG_BAD;
-      PR_fprintf(PR_STDERR, "Error: argument -osint is invalid\n");
+      PR_fprintf(PR_STDERR, "Error: argument --osint is invalid\n");
     }
   }
 
   return ar;
 }
 
 #if defined(XP_WIN)
 /**
@@ -1508,32 +1508,32 @@ DumpHelp()
          "  --display=DISPLAY  X display to use\n"
          "  --sync             Make X calls synchronous\n");
 #endif
 #ifdef XP_UNIX
   printf("  --g-fatal-warnings Make all warnings fatal\n"
          "\n%s options\n", gAppData->name);
 #endif
 
-  printf("  -h or -help        Print this message.\n"
-         "  -v or -version     Print %s version.\n"
+  printf("  -h or --help       Print this message.\n"
+         "  -v or --version    Print %s version.\n"
          "  -P <profile>       Start with <profile>.\n"
-         "  -profile <path>    Start with profile at <path>.\n"
-         "  -migration         Start with migration wizard.\n"
-         "  -ProfileManager    Start with ProfileManager.\n"
-         "  -no-remote         Do not accept or send remote commands; implies -new-instance.\n"
-         "  -new-instance      Open new instance, not a new window in running instance.\n"
-         "  -UILocale <locale> Start with <locale> resources as UI Locale.\n"
-         "  -safe-mode         Disables extensions and themes for this session.\n", gAppData->name);
+         "  --profile <path>   Start with profile at <path>.\n"
+         "  --migration        Start with migration wizard.\n"
+         "  --ProfileManager   Start with ProfileManager.\n"
+         "  --no-remote        Do not accept or send remote commands; implies --new-instance.\n"
+         "  --new-instance     Open new instance, not a new window in running instance.\n"
+         "  --UILocale <locale> Start with <locale> resources as UI Locale.\n"
+         "  --safe-mode        Disables extensions and themes for this session.\n", gAppData->name);
 
 #if defined(XP_WIN)
-  printf("  -console           Start %s with a debugging console.\n", gAppData->name);
+  printf("  --console          Start %s with a debugging console.\n", gAppData->name);
 #endif
 
-  // this works, but only after the components have registered.  so if you drop in a new command line handler, -help
+  // this works, but only after the components have registered.  so if you drop in a new command line handler, --help
   // won't not until the second run.
   // out of the bug, because we ship a component.reg file, it works correctly.
   DumpArbitraryHelp();
 }
 
 #if defined(DEBUG) && defined(XP_WIN)
 #ifdef DEBUG_warren
 #define _CRTDBG_MAP_ALLOC
@@ -2087,19 +2087,19 @@ SetCurrentProfileAsDefault(nsIToolkitPro
   return rv;
 }
 
 static bool gDoMigration = false;
 static bool gDoProfileReset = false;
 
 // Pick a profile. We need to end up with a profile lock.
 //
-// 1) check for -profile <path>
+// 1) check for --profile <path>
 // 2) check for -P <name>
-// 3) check for -ProfileManager
+// 3) check for --ProfileManager
 // 4) use the default profile, if there is one
 // 5) if there are *no* profiles, set up profile-migration
 // 6) display the profile-manager UI
 static nsresult
 SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, nsINativeAppSupport* aNative,
               bool* aStartOffline, nsACString* aProfileName)
 {
   StartupTimeline::Record(StartupTimeline::SELECT_PROFILE);
@@ -2107,41 +2107,41 @@ SelectProfile(nsIProfileLock* *aResult, 
   nsresult rv;
   ArgResult ar;
   const char* arg;
   *aResult = nullptr;
   *aStartOffline = false;
 
   ar = CheckArg("offline", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -offline is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --offline is invalid when argument --osint is specified\n");
     return NS_ERROR_FAILURE;
   }
 
   if (ar || EnvHasValue("XRE_START_OFFLINE"))
     *aStartOffline = true;
 
   if (EnvHasValue("MOZ_RESET_PROFILE_RESTART")) {
     gDoProfileReset = true;
     gDoMigration = true;
     SaveToEnv("MOZ_RESET_PROFILE_RESTART=");
   }
 
   // reset-profile and migration args need to be checked before any profiles are chosen below.
   ar = CheckArg("reset-profile", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -reset-profile is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --reset-profile is invalid when argument --osint is specified\n");
     return NS_ERROR_FAILURE;
   } else if (ar == ARG_FOUND) {
     gDoProfileReset = true;
   }
 
   ar = CheckArg("migration", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -migration is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --migration is invalid when argument --osint is specified\n");
     return NS_ERROR_FAILURE;
   } else if (ar == ARG_FOUND) {
     gDoMigration = true;
   }
 
   nsCOMPtr<nsIFile> lf = GetFileFromEnv("XRE_PROFILE_PATH");
   if (lf) {
     nsCOMPtr<nsIFile> localDir =
@@ -2192,17 +2192,17 @@ SelectProfile(nsIProfileLock* *aResult, 
       }
     }
 
     return NS_LockProfilePath(lf, localDir, nullptr, aResult);
   }
 
   ar = CheckArg("profile", true, &arg);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -profile requires a path\n");
+    PR_fprintf(PR_STDERR, "Error: argument --profile requires a path\n");
     return NS_ERROR_FAILURE;
   }
   if (ar) {
     if (gDoProfileReset) {
       NS_WARNING("Profile reset is only supported for the default profile.");
       gDoProfileReset = false;
     }
 
@@ -2226,33 +2226,33 @@ SelectProfile(nsIProfileLock* *aResult, 
     if (NS_SUCCEEDED(rv))
       return rv;
 
     return ProfileLockedDialog(lf, lf, unlocker, aNative, aResult);
   }
 
   ar = CheckArg("createprofile", true, &arg);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -createprofile requires a profile name\n");
+    PR_fprintf(PR_STDERR, "Error: argument --createprofile requires a profile name\n");
     return NS_ERROR_FAILURE;
   }
   if (ar) {
     nsCOMPtr<nsIToolkitProfile> profile;
 
     const char* delim = strchr(arg, ' ');
     if (delim) {
       nsCOMPtr<nsIFile> lf;
       rv = NS_NewNativeLocalFile(nsDependentCString(delim + 1),
                                    true, getter_AddRefs(lf));
       if (NS_FAILED(rv)) {
         PR_fprintf(PR_STDERR, "Error: profile path not valid.\n");
         return rv;
       }
-      
-      // As with -profile, assume that the given path will be used for the
+
+      // As with --profile, assume that the given path will be used for the
       // main profile directory.
       rv = aProfileSvc->CreateProfile(lf, nsDependentCSubstring(arg, delim),
                                      getter_AddRefs(profile));
     } else {
       rv = aProfileSvc->CreateProfile(nullptr, nsDependentCString(arg),
                                      getter_AddRefs(profile));
     }
     // Some pathological arguments can make it this far
@@ -2283,28 +2283,28 @@ SelectProfile(nsIProfileLock* *aResult, 
   uint32_t count;
   rv = aProfileSvc->GetProfileCount(&count);
   NS_ENSURE_SUCCESS(rv, rv);
 
   ar = CheckArg("p", false, &arg);
   if (ar == ARG_BAD) {
     ar = CheckArg("osint");
     if (ar == ARG_FOUND) {
-      PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument -osint is specified\n");
+      PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument --osint is specified\n");
       return NS_ERROR_FAILURE;
     }
 
     if (CanShowProfileManager()) {
       return ShowProfileManager(aProfileSvc, aNative);
     }
   }
   if (ar) {
     ar = CheckArg("osint");
     if (ar == ARG_FOUND) {
-      PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument -osint is specified\n");
+      PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument --osint is specified\n");
       return NS_ERROR_FAILURE;
     }
     nsCOMPtr<nsIToolkitProfile> profile;
     rv = aProfileSvc->GetProfileByName(nsDependentCString(arg),
                                       getter_AddRefs(profile));
     if (NS_SUCCEEDED(rv)) {
       if (gDoProfileReset) {
         NS_WARNING("Profile reset is only supported for the default profile.");
@@ -2324,17 +2324,17 @@ SelectProfile(nsIProfileLock* *aResult, 
 
     if (CanShowProfileManager()) {
       return ShowProfileManager(aProfileSvc, aNative);
     }
   }
 
   ar = CheckArg("profilemanager", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -profilemanager is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --profilemanager is invalid when argument --osint is specified\n");
     return NS_ERROR_FAILURE;
   } else if (ar == ARG_FOUND && CanShowProfileManager()) {
     return ShowProfileManager(aProfileSvc, aNative);
   }
 
   if (!count) {
     gDoMigration = true;
     gDoProfileReset = false;
@@ -3005,17 +3005,17 @@ XREMain::XRE_mainInit(bool* aExitFlag)
   // initialized.  This works after gnome 2.24.2.
   SaveToEnv("NO_AT_BRIDGE=1");
 #endif
 
   // Check for application.ini overrides
   const char* override = nullptr;
   ar = CheckArg("override", true, &override);
   if (ar == ARG_BAD) {
-    Output(true, "Incorrect number of arguments passed to -override");
+    Output(true, "Incorrect number of arguments passed to --override");
     return 1;
   }
   else if (ar == ARG_FOUND) {
     nsCOMPtr<nsIFile> overrideLF;
     rv = XRE_GetFileFromPath(override, getter_AddRefs(overrideLF));
     if (NS_FAILED(rv)) {
       Output(true, "Error: unrecognized override.ini path.\n");
       return 1;
@@ -3215,17 +3215,17 @@ XREMain::XRE_mainInit(bool* aExitFlag)
   if (EnvHasValue("MOZ_SAFE_MODE_RESTART")) {
     gSafeMode = true;
     // unset the env variable
     SaveToEnv("MOZ_SAFE_MODE_RESTART=");
   }
 
   ar = CheckArg("safe-mode", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -safe-mode is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --safe-mode is invalid when argument --osint is specified\n");
     return 1;
   } else if (ar == ARG_FOUND) {
     gSafeMode = true;
   }
 
 #ifdef XP_WIN
   // If the shift key is pressed and the ctrl and / or alt keys are not pressed
   // during startup start in safe mode. GetKeyState returns a short and the high
@@ -3238,36 +3238,36 @@ XREMain::XRE_mainInit(bool* aExitFlag)
   }
 #endif
 
 #ifdef XP_MACOSX
   if (GetCurrentEventKeyModifiers() & optionKey)
     gSafeMode = true;
 #endif
 
-  // Handle -no-remote and -new-instance command line arguments. Setup
+  // Handle --no-remote and --new-instance command line arguments. Setup
   // the environment to better accommodate other components and various
   // restart scenarios.
   ar = CheckArg("no-remote", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -no-remote is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --no-remote is invalid when argument --osint is specified\n");
     return 1;
   } else if (ar == ARG_FOUND) {
     SaveToEnv("MOZ_NO_REMOTE=1");
   }
 
   ar = CheckArg("new-instance", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -new-instance is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --new-instance is invalid when argument --osint is specified\n");
     return 1;
   } else if (ar == ARG_FOUND) {
     SaveToEnv("MOZ_NEW_INSTANCE=1");
   }
 
-  // Handle -help and -version command line arguments.
+  // Handle --help and --version command line arguments.
   // They should return quickly, so we deal with them here.
   if (CheckArg("h") || CheckArg("help") || CheckArg("?")) {
     DumpHelp();
     *aExitFlag = true;
     return 0;
   }
 
   if (CheckArg("v") || CheckArg("version")) {
@@ -3278,20 +3278,20 @@ XREMain::XRE_mainInit(bool* aExitFlag)
     
 #ifdef NS_TRACE_MALLOC
   gArgc = NS_TraceMallocStartupArgs(gArgc, gArgv);
 #endif
 
   rv = XRE_InitCommandLine(gArgc, gArgv);
   NS_ENSURE_SUCCESS(rv, 1);
 
-  // Check for -register, which registers chrome and then exits immediately.
+  // Check for --register, which registers chrome and then exits immediately.
   ar = CheckArg("register", true);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -register is invalid when argument -osint is specified\n");
+    PR_fprintf(PR_STDERR, "Error: argument --register is invalid when argument --osint is specified\n");
     return 1;
   } else if (ar == ARG_FOUND) {
     ScopedXPCOMStartup xpcom;
     rv = xpcom.Initialize();
     NS_ENSURE_SUCCESS(rv, 1);
     {
       nsCOMPtr<nsIChromeRegistry> chromeReg =
         mozilla::services::GetChromeRegistryService();
@@ -3532,17 +3532,17 @@ XREMain::XRE_mainStartup(bool* aExitFlag
     if (!display_name) {
       PR_fprintf(PR_STDERR, "Error: no display specified\n");
       return 1;
     }
   }
 #endif /* MOZ_WIDGET_GTK */
 
 #ifdef MOZ_ENABLE_XREMOTE
-  // handle -remote now that xpcom is fired up
+  // handle --remote now that xpcom is fired up
   bool newInstance;
   {
     char *e = PR_GetEnv("MOZ_NO_REMOTE");
     mDisableRemote = (e && *e);
     if (mDisableRemote) {
       newInstance = true;
     } else {
       e = PR_GetEnv("MOZ_NEW_INSTANCE");
@@ -4449,41 +4449,41 @@ XRE_InitCommandLine(int aArgc, char* aAr
   for (int i = 0; i < aArgc; ++i)
       free(canonArgs[i]);
   delete[] canonArgs;
 #endif
 
   const char *path = nullptr;
   ArgResult ar = CheckArg("greomni", false, &path);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -greomni requires a path argument\n");
+    PR_fprintf(PR_STDERR, "Error: argument --greomni requires a path argument\n");
     return NS_ERROR_FAILURE;
   }
 
   if (!path)
     return rv;
 
   nsCOMPtr<nsIFile> greOmni;
   rv = XRE_GetFileFromPath(path, getter_AddRefs(greOmni));
   if (NS_FAILED(rv)) {
-    PR_fprintf(PR_STDERR, "Error: argument -greomni requires a valid path\n");
+    PR_fprintf(PR_STDERR, "Error: argument --greomni requires a valid path\n");
     return rv;
   }
 
   ar = CheckArg("appomni", false, &path);
   if (ar == ARG_BAD) {
-    PR_fprintf(PR_STDERR, "Error: argument -appomni requires a path argument\n");
+    PR_fprintf(PR_STDERR, "Error: argument --appomni requires a path argument\n");
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIFile> appOmni;
   if (path) {
       rv = XRE_GetFileFromPath(path, getter_AddRefs(appOmni));
       if (NS_FAILED(rv)) {
-        PR_fprintf(PR_STDERR, "Error: argument -appomni requires a valid path\n");
+        PR_fprintf(PR_STDERR, "Error: argument --appomni requires a valid path\n");
         return rv;
       }
   }
 
   mozilla::Omnijar::Init(greOmni, appOmni);
   return rv;
 }
 
--- a/toolkit/xre/nsNativeAppSupportWin.cpp
+++ b/toolkit/xre/nsNativeAppSupportWin.cpp
@@ -246,22 +246,22 @@ private:
  *    WWW_OpenURL topic and the params as specified in the ifexec registry key
  *    for the verb (e.g. open).
  *
  * Application DDE Sequence:
  * 1. If the application is running a DDE request is received with the
  *    WWW_OpenURL topic and the params as specified in the default value of the
  *    ddeexec registry key (e.g. "%1",,0,0,,,, where '%1' is the url to open)
  *    for the verb (e.g. open).
- * 2. If the application is not running it is launched with the -requestPending
- *    and the -url argument.
- * 2.1  If the application does not need to restart and the -requestPending
+ * 2. If the application is not running it is launched with the --requestPending
+ *    and the --url argument.
+ * 2.1  If the application does not need to restart and the --requestPending
  *      argument is present the accompanying url will not be used. Instead the
  *      application will wait for the DDE message to open the url.
- * 2.2  If the application needs to restart the -requestPending argument is
+ * 2.2  If the application needs to restart the --requestPending argument is
  *      removed from the arguments used to restart the application and the url
  *      will be handled normally.
  *
  * Note: Due to a bug in IE the ifexec key should not be used (see bug 355650).
  */
 
 class nsNativeAppSupportWin : public nsNativeAppSupportBase,
                               public nsIObserver
@@ -273,17 +273,17 @@ public:
     // Overrides of base implementation.
     NS_IMETHOD Start( bool *aResult );
     NS_IMETHOD Stop( bool *aResult );
     NS_IMETHOD Quit();
     NS_IMETHOD Enable();
     // The "old" Start method (renamed).
     NS_IMETHOD StartDDE();
     // Utility function to handle a Win32-specific command line
-    // option: "-console", which dynamically creates a Windows
+    // option: "--console", which dynamically creates a Windows
     // console.
     void CheckConsole();
 
 private:
     ~nsNativeAppSupportWin() {}
     static void HandleCommandLine(const char* aCmdLineString, nsIFile* aWorkingDir, uint32_t aState);
     static HDDEDATA CALLBACK HandleDDENotification( UINT     uType,
                                                     UINT     uFmt,
--- a/webapprt/mac/webapprt.mm
+++ b/webapprt/mac/webapprt.mm
@@ -254,17 +254,17 @@ main(int argc, char **argv)
         nsXREAppData *webShellAppData;
         if (NS_FAILED(XRE_CreateAppData(rtINI, &webShellAppData))) {
           NSLog(@"Couldn't read WebappRT application.ini: %s", rtINIPath);
           @throw MakeException(@"Error", @"Unable to parse base INI file.");
         }
 
         NSString *profile = [args objectForKey:@"profile"];
         if (profile) {
-          NSLog(@"Profile specified with -profile: %@", profile);
+          NSLog(@"Profile specified with --profile: %@", profile);
         }
         else {
           nsINIParser parser;
           if (NS_FAILED(parser.Init(appEnv))) {
             NSLog(@"%s was not found\n", appEnv);
             @throw MakeException(@"Error", @"Unable to parse environment files for application startup");
           }
           char profile[MAXPATHLEN];
--- a/webapprt/win/webapprt.cpp
+++ b/webapprt/win/webapprt.cpp
@@ -439,17 +439,17 @@ main(int argc, char* argv[])
                                buffer,
                                MAXPATHLEN,
                                nullptr,
                                nullptr)) {
     Output("Application directory could not be processed.");
     return 255;
   }
 
-  // Check if the runtime was executed with the "-profile" argument
+  // Check if the runtime was executed with the "--profile" argument
   for (int i = 1; i < argc; i++) {
     if (!strcmp(argv[i], "-profile") ||
         !strcmp(argv[i], "--profile") ||
         !strcmp(argv[i], "/profile")) {
       isProfileOverridden = true;
       break;
     }
   }
--- a/widget/windows/winrt/MetroContracts.cpp
+++ b/widget/windows/winrt/MetroContracts.cpp
@@ -92,17 +92,17 @@ FrameworkView::LaunchActivated(ComPtr<IL
 {
   if (!aArgs)
     return;
   HString data;
   AssertHRESULT(aArgs->get_Arguments(data.GetAddressOf()));
   if (WindowsIsStringEmpty(data.Get()))
     return;
 
-  // If we're being launched from a secondary tile then we have a 2nd command line param of -url
+  // If we're being launched from a secondary tile then we have a 2nd command line param of --url
   // and a third of the secondary tile.  We want it in sActivationURI so that browser.js will
   // load it in without showing the start UI.
   int argc;
   unsigned int length;
   LPWSTR* argv = CommandLineToArgvW(data.GetRawBuffer(&length), &argc);
   if (aStartup && argc == 2 &&
       (!wcsicmp(argv[0], L"-url") ||
        !wcsicmp(argv[0], L"--url") ||
--- a/xpfe/test/winopen.js
+++ b/xpfe/test/winopen.js
@@ -31,20 +31,20 @@ const options = [ [ "phase1", "PHASE_ONE
                   [ "phase3", "PHASE_THREE", false ],
                   [ "overlap", "OVERLAP_COUNT", false ],
                   [ "cycles", "CYCLES", false ],
                   [ "chrome", "KID_CHROME", true ],
                   [ "close", "AUTOCLOSE", false ] ];
 
 // Note: You can attach search options to the url for this file to control
 // any of the options in the array above.  E.g., specifying
-// mozilla -chrome "file:///D|/mozilla/xpfe/test/winopen.xul?phase1=16&close=0"
+// mozilla --chrome "file:///D|/mozilla/xpfe/test/winopen.xul?phase1=16&close=0"
 // will run this script with PHASE_ONE=16 and AUTOCLOSE=0.
 //
-// On Win32, you must enclose the -chrome option in quotes in order pass funny Win32 shell
+// On Win32, you must enclose the --chrome option in quotes in order pass funny Win32 shell
 // characters such as '&' or '|'!
 
 var opts = window.location.search.substring(1).split( '&' );
 for ( opt in opts ) {
     for ( var i in options ) {
         if ( opts[opt].indexOf( options[i][0]+"=" ) == 0 ) {
             var newVal = opts[opt].split( '=' )[ 1 ];
             // wrap with quotes, if required.