commit 3c02f0b0e6b77418448388434a5fb986b626ed31
parent 28cc02f954b00a30e42aedaa2f2f0e6b8532a968
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 30 Aug 2011 00:49:04 +0000
Zotero.waiting is now a number
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -172,7 +172,7 @@ if(appInfo.platformVersion[0] >= 2) {
var _zoteroDirectory = false;
var _localizedStringBundle;
var _localUserKey;
- var _waiting;
+ var _waiting = 0;
var _locked;
var _unlockCallbacks = [];
@@ -1475,15 +1475,15 @@ if(appInfo.platformVersion[0] >= 2) {
var more;
//var cycles = 0;
- _waiting = true;
+ _waiting++;
- Zotero.debug("Waiting", 5);
+ Zotero.debug("Spinning event loop ("+_waiting+")", 5);
do {
more = mainThread.processNextEvent(false);
//cycles++;
} while (more && Date.now() < endTime);
- _waiting = false;
+ _waiting--;
// requeue nsITimerCallbacks that came up during Zotero.wait() but couldn't execute
for(var i in _waitTimers) {