Bug 1885529 - Make sure HostRecordQueue::mPendingCount is accurate r=necko-reviewers,jesup

When calling MoveToAnotherPendig the record gets removed from the
pending queue, and InsertRecord is called. As InsertRecord again
increments mPendingCount, we need to decrement it when removing from
a pending queue to ensure it's accurate.

Depends on D206498

Differential Revision: https://phabricator.services.mozilla.com/D206503
This commit is contained in:
Valentin Gosu 2024-04-04 14:24:20 +00:00
Родитель 65941da2ae
Коммит e435d557c8
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -166,6 +166,10 @@ void HostRecordQueue::MoveToAnotherPendingQ(nsHostRecord* aRec,
}
aRec->remove();
// We just removed from pending queue. Insert record will
// increment this value again.
mPendingCount--;
InsertRecord(aRec, aFlags, aProofOfLock);
}