www

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

commit 46cce5a2bd7e952cd7ed5bce555fcd15bcce5f65
parent 8c6a9bfbf08009801b545f9604ddf719c11b991b
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 17 Jul 2013 18:55:43 -0400

Extra debugging for file sync hangs on slow connections

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

diff --git a/chrome/content/zotero/xpcom/storage/streamListener.js b/chrome/content/zotero/xpcom/storage/streamListener.js @@ -49,12 +49,12 @@ Zotero.Sync.Storage.StreamListener.prototype = { if (progress > progressMax) { progress = progressMax; } - //Zotero.debug("onProgress with " + progress + "/" + progressMax); + Zotero.debug("onProgress with " + progress + "/" + progressMax); this._onProgress(request, progress, progressMax); }, onStatus: function (request, context, status, statusArg) { - //Zotero.debug('onStatus'); + Zotero.debug('onStatus with ' + status); }, // nsIRequestObserver @@ -67,7 +67,7 @@ Zotero.Sync.Storage.StreamListener.prototype = { }, onStopRequest: function (request, context, status) { - Zotero.debug('onStopRequest'); + Zotero.debug('onStopRequest with ' + status); switch (status) { case 0: @@ -84,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); @@ -108,8 +108,12 @@ Zotero.Sync.Storage.StreamListener.prototype = { onStatusChange: function (progress, request, status, message) { Zotero.debug("onStatusChange with '" + message + "'"); }, - onLocationChange: function () {}, - onSecurityChange: function () {}, + onLocationChange: function () { + Zotero.debug('onLocationChange'); + }, + onSecurityChange: function () { + Zotero.debug('onSecurityChange'); + }, // nsIStreamListener onDataAvailable: function (request, context, stream, sourceOffset, length) { @@ -119,7 +123,9 @@ Zotero.Sync.Storage.StreamListener.prototype = { .createInstance(Components.interfaces.nsIScriptableInputStream); scriptableInputStream.init(stream); - this._response += scriptableInputStream.read(length); + var data = scriptableInputStream.read(length); + Zotero.debug(data); + this._response += data; }, // nsIChannelEventSink