Report memory usage for image frames. (#36581)

These changes make the image-cache memory reporter report much larger
values after loading image-heavy pages.

Testing: Manual testing on https://www.nist.gov/image-gallery
Fixes: #36559

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-04-17 07:57:04 -04:00 committed by GitHub
parent d345844ed7
commit 594c04dc7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -688,6 +688,12 @@ impl<T> MallocSizeOf for ipc_channel::ipc::IpcSender<T> {
}
}
impl MallocSizeOf for ipc_channel::ipc::IpcSharedMemory {
fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
self.len()
}
}
impl<T: MallocSizeOf> MallocSizeOf for accountable_refcell::RefCell<T> {
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
self.borrow().size_of(ops)