mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1417312 - Use copy instead of reference to avoid UAF in ASSERT. - r=daoshengmu
MozReview-Commit-ID: BWr9rkVhIHG
This commit is contained in:
parent
c6f93a7aad
commit
257e273541
@ -12,9 +12,9 @@ void
|
||||
CacheMapInvalidator::InvalidateCaches() const
|
||||
{
|
||||
while (mCacheEntries.size()) {
|
||||
const auto& entry = *(mCacheEntries.begin());
|
||||
entry->Invalidate();
|
||||
MOZ_ASSERT(mCacheEntries.find(entry) == mCacheEntries.end());
|
||||
const auto pEntry = *(mCacheEntries.begin());
|
||||
pEntry->Invalidate();
|
||||
MOZ_ASSERT(mCacheEntries.find(pEntry) == mCacheEntries.end());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user