tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 481dc19ee50c025dca22de274ca838a8ae0d1114
parent 09f5e8014568124215e737b186a3198462ae297e
Author: Atila Butkovits <abutkovits@mozilla.com>
Date:   Wed, 22 Oct 2025 17:23:17 +0300

Revert "Bug 1995710: Don't purge dictionary cache entries r=necko-reviewers,valentin" for causing bustages at CacheStorageService.cpp.

This reverts commit d770ec9c90bb24af7f11d44a6aae10c8c012ff99.

Diffstat:
Mnetwerk/cache2/CacheStorageService.cpp | 17+++--------------
1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp @@ -1497,22 +1497,11 @@ Result<size_t, nsresult> CacheStorageService::MemoryPool::PurgeByFrecency( StaticMutexAutoLock lock(CacheStorageService::Self()->Lock()); for (const auto& entry : mManagedEntries) { - // Referenced items cannot be purged and we deliberately want to not - // look at '0' frecency entries, these are new entries and can be - // ignored. Also, any dict: (CompressionDictionary) entries for an - // origin should not be purged unless empty - they will empty out as - // the cache entries referenced by them are purged until they are empty. - if (!entry->IsReferenced() && entry->GetFrecency() > 0.0 && - (!entry->GetEnhanceID().EqualsLiteral("dict:") || - entry->GetMetadataMemoryConsumption() == 0)) { + // Referenced items cannot be purged and we deliberately want to not look + // at '0' frecency entries, these are new entries and can be ignored. + if (!entry->IsReferenced() && entry->GetFrecency() > 0.0) { mayPurgeEntry copy(entry); mayPurgeSorted.AppendElement(std::move(copy)); - } else { - if (entry->GetEnhanceID().EqualsLiteral("dict:")) { - LOG_DICTIONARIES( - ("*** Entry is a dictionary origin, metadata size %d", - entry->GetMetadataMemoryConsumption())); - } } } }