diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index c3722121b3..13b7fcaf8e 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -1189,7 +1189,13 @@ function downloadPDFTool(tool, version, callback) { wbp.progressListener = progressListener; Zotero.debug("Saving " + uri.spec + " to " + fileURL.spec); - wbp.saveURI(uri, null, null, null, null, fileURL); + try { + wbp.saveURI(uri, null, null, null, null, fileURL); + } catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") { + // https://bugzilla.mozilla.org/show_bug.cgi?id=794602 + // XXX Always use when we no longer support Firefox < 18 + wbp.saveURI(uri, null, null, null, null, fileURL, null); + } } diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js index 4e1d1b8bd3..531698c8c4 100644 --- a/chrome/content/zotero/xpcom/storage/webdav.js +++ b/chrome/content/zotero/xpcom/storage/webdav.js @@ -463,7 +463,13 @@ Zotero.Sync.Storage.Session.WebDAV.prototype.downloadFile = function (request) { .createInstance(nsIWBP); wbp.persistFlags = nsIWBP.PERSIST_FLAGS_BYPASS_CACHE; wbp.progressListener = listener; - wbp.saveURI(uri, null, null, null, null, destFile); + try { + wbp.saveURI(uri, null, null, null, null, destFile); + } catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") { + // https://bugzilla.mozilla.org/show_bug.cgi?id=794602 + // XXX Always use when we no longer support Firefox < 18 + wbp.saveURI(uri, null, null, null, null, destFile, null); + } } catch (e) { request.error(e); diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js index 1a72d6dd14..b4f7c657c9 100644 --- a/chrome/content/zotero/xpcom/storage/zfs.js +++ b/chrome/content/zotero/xpcom/storage/zfs.js @@ -315,8 +315,14 @@ Zotero.Sync.Storage.Session.ZFS.prototype.downloadFile = function (request) { .classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"] .createInstance(nsIWBP); wbp.persistFlags = nsIWBP.PERSIST_FLAGS_BYPASS_CACHE; - wbp.progressListener = listener; - wbp.saveURI(uri, null, null, null, null, destFile); + wbp.progressListener = listener; + try { + wbp.saveURI(uri, null, null, null, null, destFile); + } catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") { + // https://bugzilla.mozilla.org/show_bug.cgi?id=794602 + // XXX Always use when we no longer support Firefox < 18 + wbp.saveURI(uri, null, null, null, null, destFile, null); + } } catch (e) { self.onError(e);