diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 514cccf77bcd..9368ac987079 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -191,8 +191,6 @@ @RESPATH@/browser/components/EnterprisePolicies.js @RESPATH@/browser/components/EnterprisePoliciesContent.js @RESPATH@/browser/components/EnterprisePolicies.manifest -@RESPATH@/components/Downloads.manifest -@RESPATH@/components/DownloadLegacy.js @RESPATH@/components/crashmonitor.manifest @RESPATH@/components/nsCrashMonitor.js @RESPATH@/components/toolkitsearch.manifest diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index b2d97db6e25b..44f7717e08f5 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -169,9 +169,6 @@ @BINPATH@/components/nsAsyncShutdown.manifest @BINPATH@/components/nsAsyncShutdown.js -@BINPATH@/components/Downloads.manifest -@BINPATH@/components/DownloadLegacy.js - #ifndef MOZ_GECKOVIEW_JAR @BINPATH@/components/BuiltinProviders.manifest @BINPATH@/components/PresentationControlService.js diff --git a/toolkit/components/downloads/DownloadLegacy.js b/toolkit/components/downloads/DownloadLegacy.jsm similarity index 98% rename from toolkit/components/downloads/DownloadLegacy.js rename to toolkit/components/downloads/DownloadLegacy.jsm index 18f501a4222f..2795f75f0c84 100644 --- a/toolkit/components/downloads/DownloadLegacy.js +++ b/toolkit/components/downloads/DownloadLegacy.jsm @@ -14,8 +14,6 @@ "use strict"; -const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - ChromeUtils.defineModuleGetter(this, "Downloads", "resource://gre/modules/Downloads.jsm"); @@ -318,4 +316,4 @@ DownloadLegacyTransfer.prototype = { _signatureInfo: null, }; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DownloadLegacyTransfer]); +var EXPORTED_SYMBOLS = ["DownloadLegacyTransfer"]; diff --git a/toolkit/components/downloads/Downloads.manifest b/toolkit/components/downloads/Downloads.manifest deleted file mode 100644 index 03d4ed4a63ff..000000000000 --- a/toolkit/components/downloads/Downloads.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {1b4c85df-cbdd-4bb6-b04e-613caece083c} DownloadLegacy.js -contract @mozilla.org/transfer;1 {1b4c85df-cbdd-4bb6-b04e-613caece083c} diff --git a/toolkit/components/downloads/components.conf b/toolkit/components/downloads/components.conf new file mode 100644 index 000000000000..8ba27d55105e --- /dev/null +++ b/toolkit/components/downloads/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': '{1b4c85df-cbdd-4bb6-b04e-613caece083c}', + 'contract_ids': ['@mozilla.org/transfer;1'], + 'jsm': 'resource://gre/modules/DownloadLegacy.jsm', + 'constructor': 'DownloadLegacyTransfer', + }, +] diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build index e7011d0413ec..493c1a442ece 100644 --- a/toolkit/components/downloads/moz.build +++ b/toolkit/components/downloads/moz.build @@ -24,14 +24,10 @@ SOURCES += [ 'DownloadPlatform.cpp', ] -EXTRA_COMPONENTS += [ - 'DownloadLegacy.js', - 'Downloads.manifest', -] - EXTRA_JS_MODULES += [ 'DownloadCore.jsm', 'DownloadIntegration.jsm', + 'DownloadLegacy.jsm', 'DownloadList.jsm', 'DownloadPaths.jsm', 'Downloads.jsm', @@ -39,6 +35,10 @@ EXTRA_JS_MODULES += [ 'DownloadUIHelper.jsm', ] +XPCOM_MANIFESTS += [ + 'components.conf', +] + if CONFIG['MOZ_PLACES']: EXTRA_JS_MODULES += [ 'DownloadHistory.jsm',