mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
Bug 1068962 - Fix task cleanup on settings locks where finalize has already been called; r=bent
--HG-- extra : rebase_source : 18992e6c2e0277d2866fe92048b52a0a55a55ee6
This commit is contained in:
parent
f52164c1b5
commit
e752fcb527
@ -580,9 +580,11 @@ let SettingsRequestManager = {
|
||||
while (currentTask) {
|
||||
if (DEBUG) debug("Running Operation " + currentTask.operation);
|
||||
if (lock.finalizing) {
|
||||
// We should really never get to this point, but if we do,
|
||||
// fail every task that happens.
|
||||
Cu.reportError("Settings lock trying to run more tasks after finalizing. Ignoring tasks, but this is bad. Lock: " + aLockID);
|
||||
continue;
|
||||
}
|
||||
currentTask.defer.reject("Cannot call new task after finalizing");
|
||||
} else {
|
||||
let p;
|
||||
switch (currentTask.operation) {
|
||||
case "get":
|
||||
@ -607,6 +609,7 @@ let SettingsRequestManager = {
|
||||
ret.task.defer.reject(ret.error);
|
||||
});
|
||||
promises.push(p);
|
||||
}
|
||||
currentTask = lock.tasks.shift();
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user