diff options
Diffstat (limited to 'components/script/mem.rs')
-rw-r--r-- | components/script/mem.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/mem.rs b/components/script/mem.rs index 7b75758a22e..cc06a424480 100644 --- a/components/script/mem.rs +++ b/components/script/mem.rs @@ -12,7 +12,8 @@ use std::os::raw::c_void; /// objects by hand in code. #[allow(unsafe_code)] pub unsafe fn malloc_size_of_including_raw_self<T: MallocSizeOf>( - ops: &mut MallocSizeOfOps, obj: *const c_void) -> usize -{ + ops: &mut MallocSizeOfOps, + obj: *const c_void, +) -> usize { ops.malloc_size_of(obj) + (*(obj as *const T)).size_of(ops) } |