mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
[network] cache memory reporter cleanup
This commit is contained in:
parent
766c8e3ffd
commit
232f5a4705
2 changed files with 5 additions and 4 deletions
|
|
@ -3649,7 +3649,7 @@ CacheIndex::SizeOfExcludingThisInternal(mozilla::MallocSizeOf mallocSizeOf) cons
|
||||||
size_t
|
size_t
|
||||||
CacheIndex::SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf)
|
CacheIndex::SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf)
|
||||||
{
|
{
|
||||||
sLock.AssertCurrentThreadOwns();
|
StaticMutexAutoLock lock(sLock);
|
||||||
|
|
||||||
if (!gInstance)
|
if (!gInstance)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -3663,7 +3663,8 @@ CacheIndex::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf)
|
||||||
{
|
{
|
||||||
StaticMutexAutoLock lock(sLock);
|
StaticMutexAutoLock lock(sLock);
|
||||||
|
|
||||||
return mallocSizeOf(gInstance) + SizeOfExcludingThis(mallocSizeOf);
|
return mallocSizeOf(gInstance) +
|
||||||
|
(gInstance ? gInstance->SizeOfExcludingThisInternal(mallocSizeOf) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|
|
||||||
|
|
@ -2031,6 +2031,8 @@ NS_IMETHODIMP
|
||||||
CacheStorageService::CollectReports(nsIHandleReportCallback* aHandleReport,
|
CacheStorageService::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||||
nsISupports* aData, bool aAnonymize)
|
nsISupports* aData, bool aAnonymize)
|
||||||
{
|
{
|
||||||
|
MutexAutoLock lock(mLock);
|
||||||
|
|
||||||
MOZ_COLLECT_REPORT(
|
MOZ_COLLECT_REPORT(
|
||||||
"explicit/network/cache2/io", KIND_HEAP, UNITS_BYTES,
|
"explicit/network/cache2/io", KIND_HEAP, UNITS_BYTES,
|
||||||
CacheFileIOManager::SizeOfIncludingThis(MallocSizeOf),
|
CacheFileIOManager::SizeOfIncludingThis(MallocSizeOf),
|
||||||
|
|
@ -2041,8 +2043,6 @@ CacheStorageService::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||||
CacheIndex::SizeOfIncludingThis(MallocSizeOf),
|
CacheIndex::SizeOfIncludingThis(MallocSizeOf),
|
||||||
"Memory used by the cache index.");
|
"Memory used by the cache index.");
|
||||||
|
|
||||||
MutexAutoLock lock(mLock);
|
|
||||||
|
|
||||||
// Report the service instance, this doesn't report entries, done lower
|
// Report the service instance, this doesn't report entries, done lower
|
||||||
MOZ_COLLECT_REPORT(
|
MOZ_COLLECT_REPORT(
|
||||||
"explicit/network/cache2/service", KIND_HEAP, UNITS_BYTES,
|
"explicit/network/cache2/service", KIND_HEAP, UNITS_BYTES,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue