mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 867043 - Don't ask for more contacts more than once for the same chunk. r=reuben
This commit is contained in:
parent
43eb22d2fd
commit
9f197cc0a6
@ -471,6 +471,9 @@ ContactManager.prototype = {
|
|||||||
let contact = result.shift();
|
let contact = result.shift();
|
||||||
this._pushArray(data.cachedContacts, result);
|
this._pushArray(data.cachedContacts, result);
|
||||||
this.nextTick(this._fireSuccessOrDone.bind(this, data.cursor, contact));
|
this.nextTick(this._fireSuccessOrDone.bind(this, data.cursor, contact));
|
||||||
|
if (!contact) {
|
||||||
|
this.removeRequest(msg.cursorId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (DEBUG) debug("cursor not waiting, saving");
|
if (DEBUG) debug("cursor not waiting, saving");
|
||||||
this._pushArray(data.cachedContacts, result);
|
this._pushArray(data.cachedContacts, result);
|
||||||
@ -680,7 +683,9 @@ ContactManager.prototype = {
|
|||||||
if (DEBUG) debug("contact in cache");
|
if (DEBUG) debug("contact in cache");
|
||||||
let contact = data.cachedContacts.shift();
|
let contact = data.cachedContacts.shift();
|
||||||
this.nextTick(this._fireSuccessOrDone.bind(this, data.cursor, contact));
|
this.nextTick(this._fireSuccessOrDone.bind(this, data.cursor, contact));
|
||||||
if (data.cachedContacts.length < CONTACTS_SENDMORE_MINIMUM) {
|
if (!contact) {
|
||||||
|
this.removeRequest(aCursorId);
|
||||||
|
} else if (data.cachedContacts.length === CONTACTS_SENDMORE_MINIMUM) {
|
||||||
cpmm.sendAsyncMessage("Contacts:GetAll:SendNow", { cursorId: aCursorId });
|
cpmm.sendAsyncMessage("Contacts:GetAll:SendNow", { cursorId: aCursorId });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user