aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/rule_tree/mod.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-15 17:08:15 +0100
committerCameron McCormack <cam@mcc.id.au>2016-11-18 17:10:09 +0800
commit181208a4e4be641fc18f54b06128265a27a80c46 (patch)
tree4468e0d4c8c2a260a6b974dd7f3825422456d714 /components/style/rule_tree/mod.rs
parent22aebdf5d41a3509cd6515ccf5edcdf33715a76d (diff)
downloadservo-181208a4e4be641fc18f54b06128265a27a80c46.tar.gz
servo-181208a4e4be641fc18f54b06128265a27a80c46.zip
rule tree: Avoid yet another dumb assertion when dropping the rule tree.
Diffstat (limited to 'components/style/rule_tree/mod.rs')
-rw-r--r--components/style/rule_tree/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs
index f1574ea5856..90afc23c337 100644
--- a/components/style/rule_tree/mod.rs
+++ b/components/style/rule_tree/mod.rs
@@ -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;
}