зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685801: Part 5 - Remove BrowserUtils.restartApplication. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101485
This commit is contained in:
Родитель
368d02aa75
Коммит
16d8777f81
|
@ -18,36 +18,6 @@ ChromeUtils.defineModuleGetter(
|
|||
);
|
||||
|
||||
var BrowserUtils = {
|
||||
/**
|
||||
* restartApplication: Restarts the application, keeping it in
|
||||
* safe mode if it is already in safe mode.
|
||||
*/
|
||||
restartApplication() {
|
||||
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(
|
||||
Ci.nsISupportsPRBool
|
||||
);
|
||||
Services.obs.notifyObservers(
|
||||
cancelQuit,
|
||||
"quit-application-requested",
|
||||
"restart"
|
||||
);
|
||||
if (cancelQuit.data) {
|
||||
// The quit request has been canceled.
|
||||
return false;
|
||||
}
|
||||
// if already in safe mode restart in safe mode
|
||||
if (Services.appinfo.inSafeMode) {
|
||||
Services.startup.restartInSafeMode(
|
||||
Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
Services.startup.quit(
|
||||
Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart
|
||||
);
|
||||
return undefined;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether a page can be considered as 'empty', that its URI
|
||||
* reflects its origin, and that if it's loaded in a tab, that tab
|
||||
|
|
Загрузка…
Ссылка в новой задаче