Bug 919532 - Send quit-application-requested before restarting in safe-mode; r=MattN

This commit is contained in:
Tim Taubert 2013-10-15 11:52:08 -07:00
parent 3e6481aafc
commit 3c0a553b09

View File

@ -7127,7 +7127,14 @@ function safeModeRestart()
let rv = Services.prompt.confirmEx(window, promptTitle, promptMessage,
buttonFlags, restartText, null, null,
null, {});
if (rv == 0) {
if (rv != 0)
return;
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
.createInstance(Ci.nsISupportsPRBool);
Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
if (!cancelQuit.data) {
Services.startup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit);
}
}