Bug 820128 - Use moz_malloc_size_of to measure "images-content-used-uncompressed". r=jlebar.

--HG--
extra : rebase_source : 07e397f24a74b0e534d8ebbab53a48b7cbc3febc
This commit is contained in:
Nicholas Nethercote 2012-12-18 14:50:59 -08:00
parent 35400e8fa9
commit bfc09f0017

View File

@ -250,7 +250,12 @@ private:
nsRefPtr<imgRequest> req = entry->GetRequest();
Image *image = static_cast<Image*>(req->mImage.get());
if (image) {
*n += image->HeapSizeOfDecodedWithComputedFallback(ImagesMallocSizeOf);
// Both this and EntryAllSizes measure images-content-used-uncompressed
// memory. This function's measurement is secondary -- the result
// doesn't go in the "explicit" tree -- so we use moz_malloc_size_of
// instead of ImagesMallocSizeOf to prevent DMD from seeing it reported
// twice.
*n += image->HeapSizeOfDecodedWithComputedFallback(moz_malloc_size_of);
*n += image->NonHeapSizeOfDecoded();
}
}