Measure the stylist during memory reporting.

This commit is contained in:
Nicholas Nethercote 2017-09-05 15:11:18 +10:00 committed by Emilio Cobos Álvarez
parent f648e12935
commit d880efcab3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
14 changed files with 356 additions and 28 deletions

View file

@ -796,7 +796,7 @@ impl RuleNode {
}
fn malloc_size_of_including_self(&self, malloc_size_of: MallocSizeOfFn) -> usize {
let mut n = unsafe { malloc_size_of(self as *const _ as *const _) };
let mut n = unsafe { (malloc_size_of.0)(self as *const _ as *const _) };
for child in self.iter_children() {
n += unsafe { (*child.ptr()).malloc_size_of_including_self(malloc_size_of) };
}