Fx60: Update DB query onRow() behavior

onRow() handlers now get passed a cancellation function as a second
argument
This commit is contained in:
Dan Stillman 2019-08-27 05:58:49 -04:00
parent 564e72196f
commit b08bd6849e
3 changed files with 12 additions and 18 deletions

View file

@ -214,10 +214,11 @@ ZoteroAutoComplete.prototype.startSearch = Zotero.Promise.coroutine(function* (s
var onRow = null;
// If there's a result callback (e.g., for sorting), don't use a row handler
if (!resultsCallback) {
onRow = function (row) {
onRow = function (row, cancel) {
if (this._cancelled) {
Zotero.debug("Cancelling query");
throw StopIteration;
cancel();
return;
}
var result = row.getResultByIndex(0);
var comment = row.getResultByIndex(1);