зеркало из https://github.com/mozilla/gecko-dev.git
Bug 856273 - Filter SimplePush registrations() by app manifest URL. r=khuey
--HG-- extra : rebase_source : f01ab35375ff9d70e11d40a4426a8ef14f9166f1
This commit is contained in:
Родитель
e3283fe2b4
Коммит
7c2b346a5a
|
@ -160,13 +160,22 @@ this.PushDB.prototype = {
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
this.newTxn(
|
||||
"readonly",
|
||||
kPUSHDB_STORE_NAME,
|
||||
function txnCb(aTxn, aStore) {
|
||||
var index = aStore.index("manifestURL");
|
||||
index.mozGetAll().onsuccess = function(event) {
|
||||
aTxn.result = event.target.result;
|
||||
var range = self.dbGlobal.IDBKeyRange.only(aManifestURL);
|
||||
aTxn.result = [];
|
||||
index.openCursor(range).onsuccess = function(event) {
|
||||
var cursor = event.target.result;
|
||||
if (cursor) {
|
||||
debug(cursor.value.manifestURL + " " + cursor.value.channelID);
|
||||
aTxn.result.push(cursor.value);
|
||||
cursor.continue();
|
||||
}
|
||||
}
|
||||
},
|
||||
aSuccessCb,
|
||||
|
|
Загрузка…
Ссылка в новой задаче