Skip to content

Commit

Permalink
rule tree: Avoid yet another dumb assertion when dropping the rule tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio authored and heycam committed Nov 18, 2016
1 parent 22aebdf commit 181208a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/style/rule_tree/mod.rs
Expand Up @@ -410,10 +410,12 @@ impl StrongRuleNode {
debug_assert!(thread_state::get().is_layout() &&
!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;
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 {
return None;
}
Expand Down

0 comments on commit 181208a

Please sign in to comment.