mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Stop GCing before dropping the root rule node.
We already gc before dropping the RuleTree.
This commit is contained in:
parent
ece35f9caa
commit
31b1233a73
1 changed files with 2 additions and 4 deletions
|
@ -1329,10 +1329,8 @@ impl Drop for StrongRuleNode {
|
|||
ptr::null_mut());
|
||||
if node.parent.is_none() {
|
||||
debug!("Dropping root node!");
|
||||
// NOTE: Calling this is fine, because the rule tree root
|
||||
// destructor needs to happen from the layout thread, where the
|
||||
// stylist, and hence, the rule tree, is held.
|
||||
unsafe { self.gc() };
|
||||
// The free list should be null by this point
|
||||
debug_assert!(node.next_free.load(Ordering::Relaxed).is_null());
|
||||
let _ = unsafe { Box::from_raw(self.ptr()) };
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue