mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
rule tree: Avoid yet another dumb assertion when dropping the rule tree.
This commit is contained in:
parent
22aebdf5d4
commit
181208a4e4
1 changed files with 3 additions and 1 deletions
|
@ -410,10 +410,12 @@ impl StrongRuleNode {
|
||||||
debug_assert!(thread_state::get().is_layout() &&
|
debug_assert!(thread_state::get().is_layout() &&
|
||||||
!thread_state::get().is_worker());
|
!thread_state::get().is_worker());
|
||||||
|
|
||||||
|
// NB: This can run from the root node destructor, so we can't use
|
||||||
|
// `get()`, since it asserts the refcount is bigger than zero.
|
||||||
let me = &*self.ptr;
|
let me = &*self.ptr;
|
||||||
debug_assert!(me.is_root());
|
debug_assert!(me.is_root());
|
||||||
|
|
||||||
let current = self.get().next_free.load(Ordering::SeqCst);
|
let current = me.next_free.load(Ordering::SeqCst);
|
||||||
if current == FREE_LIST_SENTINEL {
|
if current == FREE_LIST_SENTINEL {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue