Bug 991038 - Uncaught async error in DownloadIntegration.jsm. r=paolo

This commit is contained in:
David Rajchenbach-Teller 2014-04-03 11:01:07 -04:00
parent 650dde0466
commit 6d8e793598

View File

@ -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;