mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Make MallocSizeOf::malloc_{,enclosing_}size_of unsafe.
This fixes #18473.
This commit is contained in:
parent
cad3aff508
commit
f83099f62a
3 changed files with 13 additions and 13 deletions
|
@ -67,7 +67,7 @@ impl Drop for RuleTree {
|
|||
#[cfg(feature = "gecko")]
|
||||
impl MallocSizeOf for RuleTree {
|
||||
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||
let mut n = ops.malloc_size_of(self.root.ptr());
|
||||
let mut n = unsafe { ops.malloc_size_of(self.root.ptr()) };
|
||||
n += self.root.get().size_of(ops);
|
||||
n
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ impl MallocSizeOf for RuleNode {
|
|||
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||
let mut n = 0;
|
||||
for child in self.iter_children() {
|
||||
n += ops.malloc_size_of(child.ptr());
|
||||
n += unsafe { ops.malloc_size_of(child.ptr()) };
|
||||
n += unsafe { (*child.ptr()).size_of(ops) };
|
||||
}
|
||||
n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue