commit 73282cdccc5342ee5392c2b79859fd0c683dd09c
parent 50168e596be6f68f34fcb62c6f6ec27551a4856f
Author: Mike Conley <mconley@mozilla.com>
Date: Fri, 31 Oct 2025 20:58:33 +0000
Bug 1996043 - Get rid of moz-src shims in DownloadManager now that Firefox 144 has gone to the release channel. r=home-newtab-reviewers,ini
Differential Revision: https://phabricator.services.mozilla.com/D269875
Diffstat:
1 file changed, 4 insertions(+), 26 deletions(-)
diff --git a/browser/extensions/newtab/lib/DownloadsManager.sys.mjs b/browser/extensions/newtab/lib/DownloadsManager.sys.mjs
@@ -8,36 +8,14 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
+ DownloadsCommon:
+ "moz-src:///browser/components/downloads/DownloadsCommon.sys.mjs",
+ DownloadsViewUI:
+ "moz-src:///browser/components/downloads/DownloadsViewUI.sys.mjs",
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
-ChromeUtils.defineLazyGetter(lazy, "DownloadsCommon", () => {
- try {
- return ChromeUtils.importESModule(
- "moz-src:///browser/components/downloads/DownloadsCommon.sys.mjs"
- ).DownloadsCommon;
- } catch {
- // Fallback to URI format prior to FF 143.
- return ChromeUtils.importESModule(
- "resource:///modules/DownloadsCommon.sys.mjs"
- ).DownloadsCommon;
- }
-});
-
-ChromeUtils.defineLazyGetter(lazy, "DownloadsViewUI", () => {
- try {
- return ChromeUtils.importESModule(
- "moz-src:///browser/components/downloads/DownloadsViewUI.sys.mjs"
- ).DownloadsViewUI;
- } catch {
- // Fallback to URI format prior to FF 143.
- return ChromeUtils.importESModule(
- "resource:///modules/DownloadsViewUI.sys.mjs"
- ).DownloadsViewUI;
- }
-});
-
const DOWNLOAD_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for downloads changed events
export class DownloadsManager {