Bug 1511811 - Update crossbeam-channel to 0.3.
authorBastien Orivel <eijebong@bananium.fr>
Wed, 07 Nov 2018 19:48:07 +0100
changeset 508481 eeef84fe603dacc8421c14ac951cffe569c8c815
parent 508480 7a36832beb552ab97cb7a723a8cad888ed318dd4
child 508482 bc9324a80fac8d94452ee278c2332f23ce04fbdf
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1511811, 22142
milestone65.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 1511811 - Update crossbeam-channel to 0.3. Cherry-picks https://github.com/servo/servo/pull/22142
servo/components/malloc_size_of/Cargo.toml
servo/components/malloc_size_of/lib.rs
servo/components/style/Cargo.toml
servo/components/style/animation.rs
servo/components/style/context.rs
servo/components/style/lib.rs
--- a/servo/components/malloc_size_of/Cargo.toml
+++ b/servo/components/malloc_size_of/Cargo.toml
@@ -5,43 +5,43 @@ authors = ["The Servo Project Developers
 license = "MIT/Apache-2.0"
 publish = false
 
 [lib]
 path = "lib.rs"
 
 [features]
 servo = [
+    "crossbeam-channel",
     "hyper",
     "hyper_serde",
     "keyboard-types",
     "mozjs",
     "serde",
     "serde_bytes",
-    "servo_channel",
     "string_cache",
     "time",
     "url",
     "webrender_api",
     "xml5ever",
 ]
 
 [dependencies]
 app_units = "0.7"
+crossbeam-channel = { version = "0.3", optional = true }
 cssparser = "0.25"
 euclid = "0.19"
 hashglobe = { path = "../hashglobe" }
 hyper = { version = "0.12", optional = true }
 hyper_serde = { version = "0.9", optional = true }
 keyboard-types = {version = "0.4.3", optional = true}
 selectors = { path = "../selectors" }
 serde = { version = "1.0.27", optional = true }
 serde_bytes = { version = "0.10", optional = true }
 servo_arc = { path = "../servo_arc" }
-servo_channel = { path = "../channel", optional = true }
 smallbitvec = "2.1.0"
 smallvec = "0.6"
 string_cache = { version = "0.7", optional = true }
 thin-slice = "0.1.0"
 time = { version = "0.1.17", optional = true }
 url = { version = "1.2", optional = true }
 webrender_api = { git = "https://github.com/servo/webrender", features = ["ipc"], optional = true }
 xml5ever = { version = "0.12", optional = true }
--- a/servo/components/malloc_size_of/lib.rs
+++ b/servo/components/malloc_size_of/lib.rs
@@ -39,16 +39,18 @@
 //! - If an `Rc` or `Arc` should be measured only if it hasn't been seen
 //!   before, it should be measured via the `MallocConditionalSizeOf` trait.
 //! - Using universal function call syntax is a good idea when measuring boxed
 //!   fields in structs, because it makes it clear that the Box is being
 //!   measured as well as the thing it points to. E.g.
 //!   `<Box<_> as MallocSizeOf>::size_of(field, ops)`.
 
 extern crate app_units;
+#[cfg(feature = "servo")]
+extern crate crossbeam_channel;
 extern crate cssparser;
 extern crate euclid;
 extern crate hashglobe;
 #[cfg(feature = "servo")]
 extern crate hyper;
 #[cfg(feature = "servo")]
 extern crate hyper_serde;
 #[cfg(feature = "servo")]
@@ -56,18 +58,16 @@ extern crate keyboard_types;
 #[cfg(feature = "servo")]
 extern crate mozjs as js;
 extern crate selectors;
 #[cfg(feature = "servo")]
 extern crate serde;
 #[cfg(feature = "servo")]
 extern crate serde_bytes;
 extern crate servo_arc;
-#[cfg(feature = "servo")]
-extern crate servo_channel;
 extern crate smallbitvec;
 extern crate smallvec;
 #[cfg(feature = "servo")]
 extern crate string_cache;
 extern crate thin_slice;
 #[cfg(feature = "servo")]
 extern crate time;
 #[cfg(feature = "url")]
@@ -1022,17 +1022,17 @@ where
     fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
         self.0.size_of(ops)
     }
 }
 
 // Placeholder for unique case where internals of Sender cannot be measured.
 // malloc size of is 0 macro complains about type supplied!
 #[cfg(feature = "servo")]
-impl<T> MallocSizeOf for servo_channel::Sender<T> {
+impl<T> MallocSizeOf for crossbeam_channel::Sender<T> {
     fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
         0
     }
 }
 
 #[cfg(feature = "servo")]
 impl MallocSizeOf for hyper::StatusCode {
     fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
--- a/servo/components/style/Cargo.toml
+++ b/servo/components/style/Cargo.toml
@@ -16,27 +16,28 @@ path = "lib.rs"
 doctest = false
 
 [features]
 gecko = ["nsstring", "num_cpus",
          "style_traits/gecko", "fallible/known_system_malloc"]
 use_bindgen = ["bindgen", "regex", "toml"]
 servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5ever",
          "cssparser/serde", "encoding_rs", "malloc_size_of/servo", "arrayvec/use_union",
-         "servo_url", "string_cache", "servo_channel"]
+         "servo_url", "string_cache", "crossbeam-channel"]
 gecko_debug = []
 
 [dependencies]
 app_units = "0.7"
 arrayvec = "0.4.6"
 atomic_refcell = "0.1"
 bitflags = "1.0"
 byteorder = "1.0"
 cfg-if = "0.1.0"
 cssparser = "0.25"
+crossbeam-channel = { version = "0.3", optional = true }
 new_debug_unreachable = "1.0"
 encoding_rs = {version = "0.8", optional = true}
 euclid = "0.19"
 fallible = { path = "../fallible" }
 fxhash = "0.2"
 hashglobe = { path = "../hashglobe" }
 html5ever = {version = "0.22", optional = true}
 itertools = "0.7.6"
@@ -55,17 +56,16 @@ ordered-float = "1.0"
 owning_ref = "0.3.3"
 parking_lot = "0.6"
 precomputed-hash = "0.1.1"
 rayon = "1"
 selectors = { path = "../selectors" }
 serde = {version = "1.0", optional = true, features = ["derive"]}
 servo_arc = { path = "../servo_arc" }
 servo_atoms = {path = "../atoms", optional = true}
-servo_channel = {path = "../channel", optional = true}
 servo_config = {path = "../config", optional = true}
 smallbitvec = "2.1.1"
 smallvec = "0.6"
 string_cache = { version = "0.7", optional = true }
 style_derive = {path = "../style_derive"}
 style_traits = {path = "../style_traits"}
 servo_url = {path = "../url", optional = true}
 thin-slice = "0.1.0"
--- a/servo/components/style/animation.rs
+++ b/servo/components/style/animation.rs
@@ -20,19 +20,18 @@ use crate::rule_tree::CascadeLevel;
 use crate::stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue};
 use crate::timer::Timer;
 use crate::values::computed::box_::TransitionProperty;
 use crate::values::computed::Time;
 use crate::values::computed::TimingFunction;
 use crate::values::generics::box_::AnimationIterationCount;
 use crate::values::generics::easing::{StepPosition, TimingFunction as GenericTimingFunction};
 use crate::Atom;
+use crossbeam_channel::Sender;
 use servo_arc::Arc;
-#[cfg(feature = "servo")]
-use servo_channel::Sender;
 use std::fmt;
 #[cfg(feature = "gecko")]
 use std::sync::mpsc::Sender;
 
 /// This structure represents a keyframes animation current iteration state.
 ///
 /// If the iteration count is infinite, there's no other state, otherwise we
 /// have to keep track the current iteration and the max iteration count.
--- a/servo/components/style/context.rs
+++ b/servo/components/style/context.rs
@@ -24,28 +24,28 @@ use crate::rule_tree::StrongRuleNode;
 use crate::selector_parser::{SnapshotMap, EAGER_PSEUDO_COUNT};
 use crate::shared_lock::StylesheetGuards;
 use crate::sharing::StyleSharingCache;
 use crate::stylist::Stylist;
 use crate::thread_state::{self, ThreadState};
 use crate::timer::Timer;
 use crate::traversal::DomTraversal;
 use crate::traversal_flags::TraversalFlags;
+#[cfg(feature = "servo")]
+use crossbeam_channel::Sender;
 use euclid::Size2D;
 use euclid::TypedScale;
 use fxhash::FxHashMap;
 #[cfg(feature = "servo")]
 use parking_lot::RwLock;
 use selectors::matching::ElementSelectorFlags;
 use selectors::NthIndexCache;
 use servo_arc::Arc;
 #[cfg(feature = "servo")]
 use servo_atoms::Atom;
-#[cfg(feature = "servo")]
-use servo_channel::Sender;
 use std::fmt;
 use std::ops;
 #[cfg(feature = "servo")]
 use std::sync::Mutex;
 use style_traits::CSSPixel;
 use style_traits::DevicePixel;
 #[cfg(feature = "servo")]
 use style_traits::SpeculativePainter;
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -31,16 +31,18 @@ extern crate atomic_refcell;
 #[macro_use]
 extern crate bitflags;
 #[allow(unused_extern_crates)]
 extern crate byteorder;
 #[cfg(feature = "gecko")]
 #[macro_use]
 #[no_link]
 extern crate cfg_if;
+#[cfg(feature = "servo")]
+extern crate crossbeam_channel;
 #[macro_use]
 extern crate cssparser;
 #[macro_use]
 extern crate debug_unreachable;
 extern crate euclid;
 extern crate fallible;
 extern crate fxhash;
 #[cfg(feature = "gecko")]
@@ -80,18 +82,16 @@ extern crate selectors;
 #[cfg(feature = "servo")]
 #[macro_use]
 extern crate serde;
 pub extern crate servo_arc;
 #[cfg(feature = "servo")]
 #[macro_use]
 extern crate servo_atoms;
 #[cfg(feature = "servo")]
-extern crate servo_channel;
-#[cfg(feature = "servo")]
 extern crate servo_config;
 #[cfg(feature = "servo")]
 extern crate servo_url;
 extern crate smallbitvec;
 extern crate smallvec;
 #[cfg(feature = "servo")]
 extern crate string_cache;
 #[macro_use]