Bug 1475691 - Make Servo build. r=me
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 18 Sep 2018 11:46:23 +0200
changeset 495397 951aded247b715ec88e086a86b916907e051ea51
parent 495396 88d411b26b2c2d5feb17ea7ebd270e685e7a7bfc
child 495398 d073607e0ffa242a81946bdb9cdd51b8ac2a5598
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1475691
milestone64.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 1475691 - Make Servo build. r=me StrongRuleNode is really Sync.
servo/components/style/rule_tree/mod.rs
--- a/servo/components/style/rule_tree/mod.rs
+++ b/servo/components/style/rule_tree/mod.rs
@@ -933,30 +933,29 @@ impl MallocSizeOf for RuleNode {
         for child in self.iter_children() {
             n += unsafe { ops.malloc_size_of(child.ptr()) };
             n += unsafe { (*child.ptr()).size_of(ops) };
         }
         n
     }
 }
 
-// FIXME: use std::ptr::NonNull when Firefox requires Rust 1.25+
-
 #[derive(Clone)]
 struct WeakRuleNode {
     p: ptr::NonNull<RuleNode>,
 }
 
 /// A strong reference to a rule node.
 #[derive(Debug, Eq, Hash, PartialEq)]
 pub struct StrongRuleNode {
     p: ptr::NonNull<RuleNode>,
 }
 
 unsafe impl Send for StrongRuleNode {}
+unsafe impl Sync for StrongRuleNode {}
 
 #[cfg(feature = "servo")]
 malloc_size_of_is_0!(StrongRuleNode);
 
 impl StrongRuleNode {
     fn new(n: Box<RuleNode>) -> Self {
         debug_assert_eq!(n.parent.is_none(), !n.source.is_some());