Revert "Revert "Use Q instead of Task.spawn to run processUpdatedXML()""
This reverts commit 4334260865
.
This commit is contained in:
parent
4334260865
commit
09e53d85d5
2 changed files with 10 additions and 5 deletions
|
@ -1627,9 +1627,7 @@ Zotero.Sync.Server = new function () {
|
||||||
_error(e);
|
_error(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
Components.utils.import("resource://gre/modules/Task.jsm");
|
Q.async(Zotero.Sync.Server.Data.processUpdatedXML(
|
||||||
|
|
||||||
Task.spawn(Zotero.Sync.Server.Data.processUpdatedXML(
|
|
||||||
responseNode.getElementsByTagName('updated')[0],
|
responseNode.getElementsByTagName('updated')[0],
|
||||||
lastLocalSyncDate,
|
lastLocalSyncDate,
|
||||||
syncSession,
|
syncSession,
|
||||||
|
@ -1838,7 +1836,7 @@ Zotero.Sync.Server = new function () {
|
||||||
Zotero.HTTP.doPost(url, body, uploadCallback);
|
Zotero.HTTP.doPost(url, body, uploadCallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
))
|
))()
|
||||||
.then(
|
.then(
|
||||||
null,
|
null,
|
||||||
function (e) {
|
function (e) {
|
||||||
|
|
|
@ -1021,7 +1021,14 @@ function async(makeGenerator) {
|
||||||
}
|
}
|
||||||
return when(result, callback, errback);
|
return when(result, callback, errback);
|
||||||
}
|
}
|
||||||
|
// Added by Dan
|
||||||
|
// If already a generator, use that
|
||||||
|
if (makeGenerator.send) {
|
||||||
|
var generator = makeGenerator;
|
||||||
|
}
|
||||||
|
else {
|
||||||
var generator = makeGenerator.apply(this, arguments);
|
var generator = makeGenerator.apply(this, arguments);
|
||||||
|
}
|
||||||
var callback = continuer.bind(continuer, "send");
|
var callback = continuer.bind(continuer, "send");
|
||||||
var errback = continuer.bind(continuer, "throw");
|
var errback = continuer.bind(continuer, "throw");
|
||||||
return callback();
|
return callback();
|
||||||
|
|
Loading…
Reference in a new issue