From dce2ae518789ce720d5514adaf56ef27810d980d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 1 Jun 2007 02:22:02 +0000 Subject: [PATCH] Stop WebProgressFinishListener from finishing based on transferred size alone (which I think was only necessary originally because I was misusing saveDocument() and saveURI()) --- chrome/content/zotero/xpcom/zotero.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index bffa8ef57..b1ff5c9ef 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1615,16 +1615,10 @@ Zotero.UnresponsiveScriptIndicator = new function() { * Implements nsIWebProgressListener */ Zotero.WebProgressFinishListener = function(onFinish) { - var _finished = false; - this.onStateChange = function(wp, req, stateFlags, status) { //Zotero.debug('onStageChange: ' + stateFlags); if ((stateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) && (stateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_NETWORK)) { - if (_finished) { - //Zotero.debug('onFinish() called before STATE_STOP in WebProgressFinishListener.onStateChange()'); - return; - } onFinish(); } } @@ -1633,13 +1627,6 @@ Zotero.WebProgressFinishListener = function(onFinish) { //Zotero.debug('onProgressChange'); //Zotero.debug('Current: ' + curTotalProgress); //Zotero.debug('Max: ' + maxTotalProgress); - - // STATE_STOP alone (in onStateChange) doesn't always do the trick, - // so we check for max progress too - if (curTotalProgress == maxTotalProgress) { - _finished = true; - onFinish(); - } } this.onLocationChange = function(wp, req, location) {}