Bug 1513855 ensure we notify quit application when running silent r=kmag
☠☠ backed out by 9468a3143e38 ☠ ☠
authorShane Caraveo <scaraveo@mozilla.com>
Wed, 14 Aug 2019 21:36:19 +0000
changeset 488159 61dc2ad51719c1f2a00eb5d08d925cf59bb4d0bb
parent 488158 386589f99ae841ba002bc8e67fef45ad6f84fd66
child 488160 9611e788e39a9f7c468748f1f0e6d9fb19ea5518
push id36437
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:33:18 +0000
treeherdermozilla-central@44aac6fc3352 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1513855
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/components/BrowserContentHandler.jsm
--- a/browser/components/BrowserContentHandler.jsm
+++ b/browser/components/BrowserContentHandler.jsm
@@ -1029,13 +1029,18 @@ nsDefaultCommandLineHandler.prototype = 
       // Need a better solution in the future to avoid opening the blank window
       // when command line parameters say we are not going to show a browser
       // window, but for now the blank window getting closed quickly (and
       // causing only a slight flicker) is better than leaving it open.
       let win = Services.wm.getMostRecentWindow("navigator:blank");
       if (win) {
         win.close();
       }
+      // If this is a silent run, 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.
+      Services.startup.quit(Services.startup.eForceQuit);
     }
   },
 
   helpInfo: "",
 };