1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* globals ExtensionAPI */
9 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
11 this.quitter = class extends ExtensionAPI {
16 let browserWindow = Services.wm.getMostRecentWindow(
19 if (browserWindow && browserWindow.gBrowserInit) {
20 await browserWindow.gBrowserInit.idleTasksFinishedPromise;
22 Services.startup.quit(Ci.nsIAppStartup.eForceQuit);