diff --git a/web/firefoxcom.js b/web/firefoxcom.js index 040819e60..ecbb10eeb 100644 --- a/web/firefoxcom.js +++ b/web/firefoxcom.js @@ -116,13 +116,11 @@ class DownloadManager { new Blob([data], { type: contentType }) ); - FirefoxCom.requestAsync("download", { + FirefoxCom.request("download", { blobUrl, originalUrl: blobUrl, filename, isAttachment: true, - }).then(error => { - URL.revokeObjectURL(blobUrl); }); } @@ -161,17 +159,10 @@ class DownloadManager { download(blob, url, filename) { const blobUrl = URL.createObjectURL(blob); - FirefoxCom.requestAsync("download", { + FirefoxCom.request("download", { blobUrl, originalUrl: url, filename, - }).then(error => { - if (error) { - // If downloading failed in `PdfStreamConverter.jsm` it's very unlikely - // that attempting to fallback and re-download would be helpful here. - console.error("`ChromeActions.download` failed."); - } - URL.revokeObjectURL(blobUrl); }); } }