зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 09fe0536f70e (bug 1829029) for causing build bustages on CacheFileIOManager.cpp. CLOSED TREE
This commit is contained in:
Родитель
630f1e6556
Коммит
0a279923dc
|
@ -4410,15 +4410,13 @@ class SizeOfHandlesRunnable : public Runnable {
|
|||
public:
|
||||
SizeOfHandlesRunnable(mozilla::MallocSizeOf mallocSizeOf,
|
||||
CacheFileHandles const& handles,
|
||||
nsTArray<CacheFileHandle*> const& specialHandles,
|
||||
nsCOMPtr<nsITimer> const& metadataWritesTimer)
|
||||
nsTArray<CacheFileHandle*> const& specialHandles)
|
||||
: Runnable("net::SizeOfHandlesRunnable"),
|
||||
mMonitor("SizeOfHandlesRunnable.mMonitor"),
|
||||
mMonitorNotified(false),
|
||||
mMallocSizeOf(mallocSizeOf),
|
||||
mHandles(handles),
|
||||
mSpecialHandles(specialHandles),
|
||||
mMetadataWritesTimer(metadataWritesTimer),
|
||||
mSize(0) {}
|
||||
|
||||
size_t Get(CacheIOThread* thread) {
|
||||
|
@ -4450,8 +4448,6 @@ class SizeOfHandlesRunnable : public Runnable {
|
|||
for (uint32_t i = 0; i < mSpecialHandles.Length(); ++i) {
|
||||
mSize += mSpecialHandles[i]->SizeOfIncludingThis(mMallocSizeOf);
|
||||
}
|
||||
nsCOMPtr<nsISizeOf> sizeOf = do_QueryInterface(mMetadataWritesTimer);
|
||||
if (sizeOf) mSize += sizeOf->SizeOfIncludingThis(mallocSizeOf);
|
||||
|
||||
mMonitorNotified = true;
|
||||
mon.Notify();
|
||||
|
@ -4459,12 +4455,11 @@ class SizeOfHandlesRunnable : public Runnable {
|
|||
}
|
||||
|
||||
private:
|
||||
mozilla::Monitor mMonitor;
|
||||
mozilla::Monitor mMonitor MOZ_UNANNOTATED;
|
||||
bool mMonitorNotified;
|
||||
mozilla::MallocSizeOf mMallocSizeOf;
|
||||
CacheFileHandles const& mHandles;
|
||||
nsTArray<CacheFileHandle*> const& mSpecialHandles;
|
||||
nsCOMPtr<nsITimer> const& mMetadataWritesTimer;
|
||||
size_t mSize;
|
||||
};
|
||||
|
||||
|
@ -4478,11 +4473,10 @@ size_t CacheFileIOManager::SizeOfExcludingThisInternal(
|
|||
if (mIOThread) {
|
||||
n += mIOThread->SizeOfIncludingThis(mallocSizeOf);
|
||||
|
||||
// mHandles, mSpecialHandles and mMetadataWritesTimer must be accessed
|
||||
// only on the I/O thread, must sync dispatch.
|
||||
// mHandles and mSpecialHandles must be accessed only on the I/O thread,
|
||||
// must sync dispatch.
|
||||
RefPtr<SizeOfHandlesRunnable> sizeOfHandlesRunnable =
|
||||
new SizeOfHandlesRunnable(mallocSizeOf, mHandles, mSpecialHandles,
|
||||
mMetadataWritesTimer);
|
||||
new SizeOfHandlesRunnable(mallocSizeOf, mHandles, mSpecialHandles);
|
||||
n += sizeOfHandlesRunnable->Get(mIOThread);
|
||||
}
|
||||
|
||||
|
@ -4491,6 +4485,9 @@ size_t CacheFileIOManager::SizeOfExcludingThisInternal(
|
|||
sizeOf = do_QueryInterface(mCacheDirectory);
|
||||
if (sizeOf) n += sizeOf->SizeOfIncludingThis(mallocSizeOf);
|
||||
|
||||
sizeOf = do_QueryInterface(mMetadataWritesTimer);
|
||||
if (sizeOf) n += sizeOf->SizeOfIncludingThis(mallocSizeOf);
|
||||
|
||||
sizeOf = do_QueryInterface(mTrashTimer);
|
||||
if (sizeOf) n += sizeOf->SizeOfIncludingThis(mallocSizeOf);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче