summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/lib/DownloadsManager.sys.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /browser/components/newtab/lib/DownloadsManager.sys.mjs
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/newtab/lib/DownloadsManager.sys.mjs')
-rw-r--r--browser/components/newtab/lib/DownloadsManager.sys.mjs8
1 files changed, 4 insertions, 4 deletions
diff --git a/browser/components/newtab/lib/DownloadsManager.sys.mjs b/browser/components/newtab/lib/DownloadsManager.sys.mjs
index f6e99e462a..3646ebc73a 100644
--- a/browser/components/newtab/lib/DownloadsManager.sys.mjs
+++ b/browser/components/newtab/lib/DownloadsManager.sys.mjs
@@ -7,6 +7,7 @@ import { actionTypes as at } from "resource://activity-stream/common/Actions.mjs
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
+ BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
DownloadsCommon: "resource:///modules/DownloadsCommon.sys.mjs",
DownloadsViewUI: "resource:///modules/DownloadsViewUI.sys.mjs",
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
@@ -166,10 +167,8 @@ export class DownloadsManager {
);
});
break;
- case at.OPEN_DOWNLOAD_FILE:
- const win = action._target.browser.ownerGlobal;
- const openWhere =
- action.data.event && win.whereToOpenLink(action.data.event);
+ case at.OPEN_DOWNLOAD_FILE: {
+ const openWhere = lazy.BrowserUtils.whereToOpenLink(action.data.event);
doDownloadAction(download => {
lazy.DownloadsCommon.openDownload(download, {
// Replace "current" or unknown value with "tab" as the default behavior
@@ -180,6 +179,7 @@ export class DownloadsManager {
});
});
break;
+ }
case at.UNINIT:
this.uninit();
break;