aboutsummaryrefslogtreecommitdiffstats
path: root/components/malloc_size_of/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/malloc_size_of/lib.rs')
-rw-r--r--components/malloc_size_of/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs
index 8593ccc3622..62673268ad9 100644
--- a/components/malloc_size_of/lib.rs
+++ b/components/malloc_size_of/lib.rs
@@ -46,6 +46,7 @@
//! Note: WebRender has a reduced fork of this crate, so that we can avoid
//! publishing this crate on crates.io.
+extern crate accountable_refcell;
extern crate app_units;
#[cfg(feature = "servo")]
extern crate content_security_policy;
@@ -970,3 +971,10 @@ impl<T: MallocSizeOf> DerefMut for Measurable<T> {
&mut self.0
}
}
+
+#[cfg(feature = "servo")]
+impl<T: MallocSizeOf> MallocSizeOf for accountable_refcell::RefCell<T> {
+ fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
+ self.borrow().size_of(ops)
+ }
+}