www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 49074897078f0f0d0a49f21dc1264b10339139b7
parent 78b5bc6727aa46956ce990945230352283346670
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 22 Jul 2013 02:35:53 -0400

Revert "Extra debugging for file sync hangs on slow connections"

This reverts commit 46cce5a2bd7e952cd7ed5bce555fcd15bcce5f65.

Conflicts:
	chrome/content/zotero/xpcom/storage/streamListener.js

Diffstat:
Mchrome/content/zotero/xpcom/storage/streamListener.js | 25++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/streamListener.js b/chrome/content/zotero/xpcom/storage/streamListener.js @@ -44,12 +44,17 @@ Zotero.Sync.Storage.StreamListener.prototype = { // nsIProgressEventSink onProgress: function (request, context, progress, progressMax) { - Zotero.debug("onProgress with " + progress + "/" + progressMax); + // Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=451991 + // (fixed in Fx3.1) + if (progress > progressMax) { + progress = progressMax; + } + //Zotero.debug("onProgress with " + progress + "/" + progressMax); this._onProgress(request, progress, progressMax); }, onStatus: function (request, context, status, statusArg) { - Zotero.debug('onStatus with ' + status); + //Zotero.debug('onStatus'); }, // nsIRequestObserver @@ -62,7 +67,7 @@ Zotero.Sync.Storage.StreamListener.prototype = { }, onStopRequest: function (request, context, status) { - Zotero.debug('onStopRequest with ' + status); + Zotero.debug('onStopRequest'); switch (status) { case 0: @@ -79,7 +84,7 @@ Zotero.Sync.Storage.StreamListener.prototype = { // nsIWebProgressListener onProgressChange: function (wp, request, curSelfProgress, maxSelfProgress, curTotalProgress, maxTotalProgress) { - Zotero.debug("onProgressChange with " + curTotalProgress + "/" + maxTotalProgress); + //Zotero.debug("onProgressChange with " + curTotalProgress + "/" + maxTotalProgress); // onProgress gets called too, so this isn't necessary //this._onProgress(request, curTotalProgress, maxTotalProgress); @@ -103,12 +108,8 @@ Zotero.Sync.Storage.StreamListener.prototype = { onStatusChange: function (progress, request, status, message) { Zotero.debug("onStatusChange with '" + message + "'"); }, - onLocationChange: function () { - Zotero.debug('onLocationChange'); - }, - onSecurityChange: function () { - Zotero.debug('onSecurityChange'); - }, + onLocationChange: function () {}, + onSecurityChange: function () {}, // nsIStreamListener onDataAvailable: function (request, context, stream, sourceOffset, length) { @@ -118,9 +119,7 @@ Zotero.Sync.Storage.StreamListener.prototype = { .createInstance(Components.interfaces.nsIScriptableInputStream); scriptableInputStream.init(stream); - var data = scriptableInputStream.read(length); - Zotero.debug(data); - this._response += data; + this._response += scriptableInputStream.read(length); }, // nsIChannelEventSink