mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
[network] Use a proof of lock everywhere in cache v2.
This commit is contained in:
parent
1d1618ff0c
commit
9aed4d8a38
6 changed files with 355 additions and 344 deletions
|
|
@ -24,20 +24,11 @@ CacheIndexContextIterator::~CacheIndexContextIterator()
|
|||
}
|
||||
|
||||
void
|
||||
CacheIndexContextIterator::AddRecord(CacheIndexRecord *aRecord)
|
||||
CacheIndexContextIterator::AddRecord(CacheIndexRecordWrapper* aRecord,
|
||||
const StaticMutexAutoLock& aProofOfLock)
|
||||
{
|
||||
if (CacheIndexEntry::RecordMatchesLoadContextInfo(aRecord, mInfo)) {
|
||||
CacheIndexIterator::AddRecord(aRecord);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CacheIndexContextIterator::AddRecords(
|
||||
const nsTArray<CacheIndexRecord *> &aRecords)
|
||||
{
|
||||
// We need to add one by one so that those with wrong context are ignored.
|
||||
for (uint32_t i = 0; i < aRecords.Length(); ++i) {
|
||||
AddRecord(aRecords[i]);
|
||||
CacheIndexIterator::AddRecord(aRecord, aProofOfLock);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue