diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm index 34be122de83c..b0d08ef81092 100644 --- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm +++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm @@ -791,7 +791,13 @@ this.DownloadIntegration = { if (this.dontOpenFileAndFolder) { deferred.then((value) => { this._deferTestShowDir.resolve("success"); }, - (error) => { this._deferTestShowDir.reject(error); }); + (error) => { + // Ensure that _deferTestShowDir has at least one consumer + // for the error, otherwise the error will be reported as + // uncaught. + this._deferTestShowDir.promise.then(null, function() {}); + this._deferTestShowDir.reject(error); + }); } return deferred;