commit 833ad915f53a1e31402348891d6479428b57df73
parent 7787f2f1cc1fdc74a7ccc4bb5238c425eb46fd6d
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 18 Dec 2009 12:23:34 +0000
Don't fill up error console with errors when onProgress() comes after request has finished, which seems to happen
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -2149,8 +2149,10 @@ Zotero.Sync.Storage.Request.prototype.isFinished = function () {
*/
Zotero.Sync.Storage.Request.prototype.onProgress = function (channel, progress, progressMax) {
if (!this._running) {
- throw ("Trying to update finished request " + this.name + " in "
- + "Zotero.Sync.Storage.Request.onProgress()");
+ Zotero.debug("Trying to update finished request " + this.name + " in "
+ + "Zotero.Sync.Storage.Request.onProgress() "
+ + "(" + progress + "/" + progressMax + ")", 2);
+ return;
}
if (!this.channel) {
@@ -2205,7 +2207,7 @@ Zotero.Sync.Storage.Request.prototype.stop = function () {
Zotero.debug("No channel to stop for request " + this.name);
}
}
- catch (e) { Zotero.debug(e); }
+ catch (e) {}
if (!this._running || !this.channel || finishNow) {
this.finish();