diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/components/extensions/parent/ext-downloads.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/parent/ext-downloads.js')
-rw-r--r-- | toolkit/components/extensions/parent/ext-downloads.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/toolkit/components/extensions/parent/ext-downloads.js b/toolkit/components/extensions/parent/ext-downloads.js index 9cd96e0d65..02af2d1076 100644 --- a/toolkit/components/extensions/parent/ext-downloads.js +++ b/toolkit/components/extensions/parent/ext-downloads.js @@ -212,6 +212,7 @@ class DownloadItem { let timeLeftInSeconds = sizeLeft / this.download.speed; return new Date(Date.now() + timeLeftInSeconds * 1000); } + return undefined; } get state() { @@ -460,7 +461,7 @@ const downloadQuery = query => { // an explicit value to match. function makeMatch(regex, value, field) { if (value == null && regex == null) { - return input => true; + return () => true; } let re; @@ -477,7 +478,7 @@ const downloadQuery = query => { if (re.test(value)) { return input => value == input; } - return input => false; + return () => false; } const matchFilename = makeMatch( @@ -940,7 +941,11 @@ this.downloads = class extends ExtensionAPIPersistent { const picker = Cc["@mozilla.org/filepicker;1"].createInstance( Ci.nsIFilePicker ); - picker.init(window, null, Ci.nsIFilePicker.modeSave); + picker.init( + window.browsingContext, + null, + Ci.nsIFilePicker.modeSave + ); if (lastFilePickerDirectory) { picker.displayDirectory = lastFilePickerDirectory; } else { |