diff --git a/web/app.js b/web/app.js index 2166e8f21..1c44dc548 100644 --- a/web/app.js +++ b/web/app.js @@ -993,11 +993,6 @@ const PDFViewerApplication = { const downloadManager = this.downloadManager, url = this.baseUrl, filename = this._docFilename; - downloadManager.onerror = err => { - // This error won't really be helpful because it's likely the - // fallback won't work either (or is already open). - this.error(`PDF failed to download: ${err}`); - }; // When the PDF document isn't ready, or the PDF file is still downloading, // simply download using the URL. @@ -1023,11 +1018,6 @@ const PDFViewerApplication = { const downloadManager = this.downloadManager, url = this.baseUrl, filename = this._docFilename; - downloadManager.onerror = err => { - // This error won't really be helpful because it's likely the - // fallback won't work either (or is already open). - this.error(`PDF failed to be saved: ${err}`); - }; // When the PDF document isn't ready, or the PDF file is still downloading, // simply download using the URL. diff --git a/web/download_manager.js b/web/download_manager.js index 3c287f856..0261e4580 100644 --- a/web/download_manager.js +++ b/web/download_manager.js @@ -71,7 +71,6 @@ class DownloadManager { this.downloadUrl(url, filename); return; } - const blobUrl = URL.createObjectURL(blob); download(blobUrl, filename); } diff --git a/web/firefoxcom.js b/web/firefoxcom.js index afca70122..5ea019c61 100644 --- a/web/firefoxcom.js +++ b/web/firefoxcom.js @@ -130,8 +130,10 @@ class DownloadManager { filename, sourceEventType, }).then(error => { - if (error && this.onerror) { - this.onerror(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); });