зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9b4ab01fda40 (bug 1662676) for gv-junit failures. CLOSED TREE
This commit is contained in:
Родитель
e3420fb2ff
Коммит
d25ca898cd
|
@ -8872,11 +8872,6 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: network.cache.frecency_array_check_enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "nglayout."
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "nsITimer.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include <algorithm>
|
||||
#include "mozilla/StaticPrefs_network.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
|
@ -70,23 +69,6 @@ class FrecencyComparator {
|
|||
|
||||
} // namespace
|
||||
|
||||
CacheIndexRecord::~CacheIndexRecord() {
|
||||
if (!StaticPrefs::network_cache_frecency_array_check_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<CacheIndex> index = CacheIndex::gInstance;
|
||||
if (index) {
|
||||
CacheIndex::sLock.AssertCurrentThreadOwns();
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
bool found = index->mFrecencyArray.FindAndRemoveRecord(this);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!found);
|
||||
#else
|
||||
Unused << index->mFrecencyArray.FindAndRemoveRecord(this);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This helper class is responsible for keeping CacheIndex::mIndexStats and
|
||||
* CacheIndex::mFrecencyArray up to date.
|
||||
|
@ -3399,10 +3381,6 @@ void CacheIndex::FrecencyArray::ReplaceRecord(CacheIndexRecord* aOldRecord,
|
|||
mRecs[idx] = aNewRecord;
|
||||
}
|
||||
|
||||
bool CacheIndex::FrecencyArray::FindAndRemoveRecord(CacheIndexRecord* aRecord) {
|
||||
return mRecs.RemoveElement(aRecord);
|
||||
}
|
||||
|
||||
void CacheIndex::FrecencyArray::SortIfNeeded() {
|
||||
const uint32_t kMaxUnsortedCount = 512;
|
||||
const uint32_t kMaxUnsortedPercent = 10;
|
||||
|
|
|
@ -101,8 +101,6 @@ struct CacheIndexRecord {
|
|||
mOnStopTime(kIndexTimeNotAvailable),
|
||||
mContentType(nsICacheEntry::CONTENT_TYPE_UNKNOWN),
|
||||
mFlags(0) {}
|
||||
|
||||
~CacheIndexRecord();
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -817,7 +815,6 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable {
|
|||
friend class CacheIndexEntryAutoManage;
|
||||
friend class FileOpenHelper;
|
||||
friend class CacheIndexIterator;
|
||||
friend struct CacheIndexRecord;
|
||||
|
||||
virtual ~CacheIndex();
|
||||
|
||||
|
@ -1190,7 +1187,6 @@ class CacheIndex final : public CacheFileIOListener, public nsIRunnable {
|
|||
void RemoveRecord(CacheIndexRecord* aRecord);
|
||||
void ReplaceRecord(CacheIndexRecord* aOldRecord,
|
||||
CacheIndexRecord* aNewRecord);
|
||||
bool FindAndRemoveRecord(CacheIndexRecord* aRecord);
|
||||
void SortIfNeeded();
|
||||
|
||||
size_t Length() const { return mRecs.Length() - mRemovedElements; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче