mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Measure the stylist during memory reporting.
This commit is contained in:
parent
f648e12935
commit
d880efcab3
14 changed files with 356 additions and 28 deletions
|
@ -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) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue