bug 530889 - Shutdown FastStart service r=crowder a=blocking-fennec

--HG--
extra : rebase_source : 5f092dbfdd748f6a5d19a7afc24044a9fd96ef0c
This commit is contained in:
Alex Pakhotin 2009-11-24 17:01:04 -08:00
parent b567077e43
commit cb935d3abc

View File

@ -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]),