diff --git a/toolkit/components/faststart/FastStartup.js b/toolkit/components/faststart/FastStartup.js index 6ff69a24b4f..64d855b7d6a 100644 --- a/toolkit/components/faststart/FastStartup.js +++ b/toolkit/components/faststart/FastStartup.js @@ -154,6 +154,15 @@ nsFastStartupCLH.prototype = { // handle: function fs_handle(cmdLine) { // the rest of this only handles -faststart here + + if (cmdLine.handleFlag("shutdown-faststart", false)) { + cmdLine.preventDefault = true; + // Shutdown this service + let appstartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup); + appstartup.quit(Ci.nsIAppStartup.eAttemptQuit); + return; + } + if (cmdLine.handleFlag("faststart-hidden", false) || (getenv(RESTART_ENV_VAR) == "1")) cmdLine.preventDefault = true; @@ -184,7 +193,8 @@ nsFastStartupCLH.prototype = { } }, - helpInfo: " -faststart-hidden\n", + helpInfo: " -faststart-hidden Start the FastStart service\n" + + " -shutdown-faststart Shutdown the FastStart service\n", // QI QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),