mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868952 - Fix the getAll(...) function in AlarmDB to be more efficient. r=clian
This commit is contained in:
parent
414da4c45b
commit
cd7c034c2d
@ -139,15 +139,13 @@ AlarmDB.prototype = {
|
|||||||
"readonly",
|
"readonly",
|
||||||
ALARMSTORE_NAME,
|
ALARMSTORE_NAME,
|
||||||
function txnCb(aTxn, aStore) {
|
function txnCb(aTxn, aStore) {
|
||||||
if (!aTxn.result)
|
if (!aTxn.result) {
|
||||||
aTxn.result = [];
|
aTxn.result = [];
|
||||||
|
}
|
||||||
|
|
||||||
aStore.mozGetAll().onsuccess = function setTxnResult(aEvent) {
|
let index = aStore.index("manifestURL");
|
||||||
aEvent.target.result.forEach(function addAlarm(aAlarm) {
|
index.mozGetAll(aManifestURL).onsuccess = function setTxnResult(aEvent) {
|
||||||
if (!aManifestURL || aManifestURL == aAlarm.manifestURL)
|
aTxn.result = aEvent.target.result;
|
||||||
aTxn.result.push(aAlarm);
|
|
||||||
});
|
|
||||||
|
|
||||||
debug("Request successful. Record count: " + aTxn.result.length);
|
debug("Request successful. Record count: " + aTxn.result.length);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user