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

This reverts commit 46cce5a2bd.

Conflicts:
	chrome/content/zotero/xpcom/storage/streamListener.js
This commit is contained in:
Dan Stillman 2013-07-22 02:35:53 -04:00
parent 78b5bc6727
commit 4907489707

View File

@ -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