Bug 1560777 - Fix RuleNode::has_children_for_testing.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 23 Jun 2019 12:40:00 +0200
changeset 479905 4ba30243e4a2059688d8e7d9a1ab02658e788605
parent 479904 920eb58d6dfa67b2ba01a5cb6770d0a407dc8993
child 479906 322c3ae81799c7edcde44471a2e225998a9d61c4
push id88354
push useremilio@crisal.io
push dateSun, 23 Jun 2019 11:28:20 +0000
treeherderautoland@4ed761cebb7f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1560777
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1560777 - Fix RuleNode::has_children_for_testing. I fixed it in the last sync but forgot to do that in Gecko.
servo/components/style/rule_tree/mod.rs
--- a/servo/components/style/rule_tree/mod.rs
+++ b/servo/components/style/rule_tree/mod.rs
@@ -1200,17 +1200,17 @@ impl StrongRuleNode {
         SelfAndAncestors {
             current: Some(self),
         }
     }
 
     /// Returns whether this node has any child, only intended for testing
     /// purposes, and called on a single-threaded fashion only.
     pub unsafe fn has_children_for_testing(&self) -> bool {
-        self.get().children.read().is_empty()
+        !self.get().children.read().is_empty()
     }
 
     unsafe fn pop_from_free_list(&self) -> Option<WeakRuleNode> {
         // 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.p.as_ptr();
 
         debug_assert!(me.is_root());