www

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

commit 71bd1a7f99cd14152486ffd1bdcccece4522d8cd
parent 72bb8acfd15f13427e9aaebf4b36487e08a1b76d
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun,  5 Oct 2014 12:03:50 -0400

Fix state check errors (middle-pane restart messages) during syncing

The state check errors were caused by 4812ab6f, which was a fix for
"Q.async(...)(...) is undefined" errors caused by ad8b81f4c, which was a
fix for "too much recursion" errors related to Task.spawn() on Windows
with JIT enabled.

Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 16++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -1627,7 +1627,7 @@ Zotero.Sync.Server = new function () { _error(e); } - Q.async(Zotero.Sync.Server.Data.processUpdatedXML( + var result = Q.async(Zotero.Sync.Server.Data.processUpdatedXML( responseNode.getElementsByTagName('updated')[0], lastLocalSyncDate, syncSession, @@ -1836,13 +1836,11 @@ Zotero.Sync.Server = new function () { Zotero.HTTP.doPost(url, body, uploadCallback); } } - ))() - .then( - null, - function (e) { - errorHandler(e); - } - ); + ))(); + + if (Q.isPromise(result)) { + result.catch(errorHandler); + } } catch (e) { _error(e); @@ -2676,8 +2674,6 @@ Zotero.Sync.Server.Data = new function() { this.processUpdatedXML = function (updatedNode, lastLocalSyncDate, syncSession, defaultLibraryID, callback) { - yield true; - updatedNode.xpath = function (path) { return Zotero.Utilities.xpath(this, path); };