зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1513855 ensure we notify quit application when running silent r=kmag
Running with -silent does not result in the quit application granted notification. Without that notification, we have a deadlock in EnvironmentAddonBuilder where it blocks beforeShutdown waiting on the XPIDatabase to load. Differential Revision: https://phabricator.services.mozilla.com/D41877 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
595de881b0
Коммит
8cc7d865b8
|
@ -1034,6 +1034,19 @@ nsDefaultCommandLineHandler.prototype = {
|
|||
if (win) {
|
||||
win.close();
|
||||
}
|
||||
// If this is a silent run where we do not open any window, we must
|
||||
// notify shutdown so that the quit-application-granted notification
|
||||
// will happen. This is required in the AddonManager to properly
|
||||
// handle shutdown blockers for Telemetry and XPIDatabase.
|
||||
// Some command handlers open a window asynchronously, so lets give
|
||||
// that time and then verify that a window was not opened before
|
||||
// quiting.
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
win = Services.wm.getMostRecentWindow(null);
|
||||
if (!win) {
|
||||
Services.startup.quit(Services.startup.eForceQuit);
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче