Skip to content

Commit

Permalink
Workaround to fix #37.
Browse files Browse the repository at this point in the history
Another parameter is added in saveURI in Firefox 36, so use a stupid try/catch to deal with that.
  • Loading branch information
littlebtc committed Mar 15, 2015
1 parent f6a174d commit 2cae581
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/DownloadUtils.jsm
Expand Up @@ -69,7 +69,14 @@ var persistWorker = function(options) {
/* Do the job; An extra null due to bug 794602
* XXX: Private browsing aware */
this._persist.progressListener = this;
this._persist.saveURI(URI, null, refURI, postData, null, options.file, null);
try {
this._persist.saveURI(URI, null, refURI, postData, null, options.file, null);
} catch(e) {
// Workaround for Firefox 36.
// Though there may be a lot of reason that saveURI throws,
// but it should work well in both older and newer version.
this._persist.saveURI(URI, null, refURI, null, postData, null, options.file, null);
}
};

/* Implements nsIWebProgressListener */
Expand Down

0 comments on commit 2cae581

Please sign in to comment.