diff --git a/browser/base/content/test/performance/browser_startup_content.js b/browser/base/content/test/performance/browser_startup_content.js index dbf8d92c5287..17028cc7c196 100644 --- a/browser/base/content/test/performance/browser_startup_content.js +++ b/browser/base/content/test/performance/browser_startup_content.js @@ -99,10 +99,8 @@ const whitelist = { // required, as opposed to items in the main whitelist, // which are all required. const intermittently_loaded_whitelist = { - components: new Set([ - "nsAsyncShutdown.js", - ]), modules: new Set([ + "resource://gre/modules/nsAsyncShutdown.jsm", "resource://gre/modules/sessionstore/Utils.jsm", ]), frameScripts: new Set([]), diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 1d640c17a91e..ca2389d1e049 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -246,9 +246,6 @@ @RESPATH@/defaults/pref/marionette.js #endif -@RESPATH@/components/nsAsyncShutdown.manifest -@RESPATH@/components/nsAsyncShutdown.js - @RESPATH@/components/BuiltinProviders.manifest @RESPATH@/components/PresentationControlService.js diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index 79424c60ff87..79a9a7199e49 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -158,9 +158,6 @@ @BINPATH@/components/TestInterfaceJSMaplike.js #endif -@BINPATH@/components/nsAsyncShutdown.manifest -@BINPATH@/components/nsAsyncShutdown.js - #ifndef MOZ_GECKOVIEW_JAR @BINPATH@/components/BuiltinProviders.manifest @BINPATH@/components/PresentationControlService.js diff --git a/toolkit/components/asyncshutdown/components.conf b/toolkit/components/asyncshutdown/components.conf new file mode 100644 index 000000000000..37a8539cff09 --- /dev/null +++ b/toolkit/components/asyncshutdown/components.conf @@ -0,0 +1,14 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Classes = [ + { + 'cid': '{35c496de-a115-475d-93b5-ffa3f3ae6fe3}', + 'contract_ids': ['@mozilla.org/async-shutdown-service;1'], + 'jsm': 'resource://gre/modules/nsAsyncShutdown.jsm', + 'constructor': 'nsAsyncShutdownService', + }, +] diff --git a/toolkit/components/asyncshutdown/moz.build b/toolkit/components/asyncshutdown/moz.build index 79a4c44c7009..de601f409c8c 100644 --- a/toolkit/components/asyncshutdown/moz.build +++ b/toolkit/components/asyncshutdown/moz.build @@ -14,11 +14,11 @@ XPIDL_SOURCES += [ EXTRA_JS_MODULES += [ 'AsyncShutdown.jsm', + 'nsAsyncShutdown.jsm', ] -EXTRA_COMPONENTS += [ - 'nsAsyncShutdown.js', - 'nsAsyncShutdown.manifest', +XPCOM_MANIFESTS += [ + 'components.conf', ] with Files('**'): diff --git a/toolkit/components/asyncshutdown/nsAsyncShutdown.js b/toolkit/components/asyncshutdown/nsAsyncShutdown.jsm similarity index 92% rename from toolkit/components/asyncshutdown/nsAsyncShutdown.js rename to toolkit/components/asyncshutdown/nsAsyncShutdown.jsm index 89e983b87003..1f544f3939ae 100644 --- a/toolkit/components/asyncshutdown/nsAsyncShutdown.js +++ b/toolkit/components/asyncshutdown/nsAsyncShutdown.jsm @@ -8,7 +8,6 @@ "use strict"; -var XPCOMUtils = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", {}).XPCOMUtils; ChromeUtils.defineModuleGetter(this, "AsyncShutdown", "resource://gre/modules/AsyncShutdown.jsm"); @@ -174,9 +173,7 @@ nsAsyncShutdownClient.prototype = { return this._moduleClient.removeBlocker(moduleBlocker); }, - /* ........ QueryInterface .............. */ QueryInterface: ChromeUtils.generateQI([Ci.nsIAsyncShutdownBarrier]), - classID: Components.ID("{314e9e96-cc37-4d5c-843b-54709ce11426}"), }; /** @@ -206,9 +203,7 @@ nsAsyncShutdownBarrier.prototype = { // By specification, _moduleBarrier.wait() cannot reject. }, - /* ........ QueryInterface .............. */ QueryInterface: ChromeUtils.generateQI([Ci.nsIAsyncShutdownBarrier]), - classID: Components.ID("{29a0e8b5-9111-4c09-a0eb-76cd02bf20fa}"), }; function nsAsyncShutdownService() { @@ -253,14 +248,7 @@ nsAsyncShutdownService.prototype = { return new nsAsyncShutdownBarrier(new AsyncShutdown.Barrier(name)); }, - /* ........ QueryInterface .............. */ QueryInterface: ChromeUtils.generateQI([Ci.nsIAsyncShutdownService]), - classID: Components.ID("{35c496de-a115-475d-93b5-ffa3f3ae6fe3}"), }; - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ - nsAsyncShutdownService, - nsAsyncShutdownBarrier, - nsAsyncShutdownClient, -]); +var EXPORTED_SYMBOLS = ["nsAsyncShutdownService"]; diff --git a/toolkit/components/asyncshutdown/nsAsyncShutdown.manifest b/toolkit/components/asyncshutdown/nsAsyncShutdown.manifest deleted file mode 100644 index 67f247902ff0..000000000000 --- a/toolkit/components/asyncshutdown/nsAsyncShutdown.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {35c496de-a115-475d-93b5-ffa3f3ae6fe3} nsAsyncShutdown.js -contract @mozilla.org/async-shutdown-service;1 {35c496de-a115-475d-93b5-ffa3f3ae6fe3}