mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 919532 - Send quit-application-requested before restarting in safe-mode; r=MattN
This commit is contained in:
parent
3e6481aafc
commit
3c0a553b09
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user