No bug - Cherry-pick some Servo removals from malloc_size_of. r=npotb
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 07 May 2019 12:59:40 +0200
changeset 531693 79146a949e96aa65b2387c8abc840637b3b9f423
parent 531661 6fd64908d113d7cdf085be1e2858e10dd69643e3
child 531694 f1082516d62f3b8ff6ed1ec44c1e2328bd2a3977
child 531695 85ca0fd33049018c147148a5a3b82898c01c1e9e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnpotb
milestone68.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
No bug - Cherry-pick some Servo removals from malloc_size_of. r=npotb
servo/components/malloc_size_of/Cargo.toml
servo/components/malloc_size_of/lib.rs
--- a/servo/components/malloc_size_of/Cargo.toml
+++ b/servo/components/malloc_size_of/Cargo.toml
@@ -9,17 +9,16 @@ publish = false
 path = "lib.rs"
 
 [features]
 servo = [
     "crossbeam-channel",
     "hyper",
     "hyper_serde",
     "keyboard-types",
-    "mozjs",
     "serde",
     "serde_bytes",
     "string_cache",
     "time",
     "url",
     "webrender_api",
     "xml5ever",
 ]
@@ -28,17 +27,16 @@ servo = [
 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}
-mozjs = { version = "0.10.0", optional = true}
 selectors = { path = "../selectors" }
 serde = { version = "1.0.27", optional = true }
 serde_bytes = { version = "0.10", optional = true }
 servo_arc = { path = "../servo_arc" }
 smallbitvec = "2.3.0"
 smallvec = "0.6"
 string_cache = { version = "0.7", optional = true }
 thin-slice = "0.1.0"
--- a/servo/components/malloc_size_of/lib.rs
+++ b/servo/components/malloc_size_of/lib.rs
@@ -53,18 +53,16 @@ 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")]
 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;
 extern crate smallbitvec;
 extern crate smallvec;
@@ -788,25 +786,16 @@ impl MallocSizeOf for Void {
 
 #[cfg(feature = "servo")]
 impl<Static: string_cache::StaticAtomSet> MallocSizeOf for string_cache::Atom<Static> {
     fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
         0
     }
 }
 
-// This is measured properly by the heap measurement implemented in
-// SpiderMonkey.
-#[cfg(feature = "servo")]
-impl<T: Copy + js::rust::GCMethods> MallocSizeOf for js::jsapi::Heap<T> {
-    fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
-        0
-    }
-}
-
 /// For use on types where size_of() returns 0.
 #[macro_export]
 macro_rules! malloc_size_of_is_0(
     ($($ty:ty),+) => (
         $(
             impl $crate::MallocSizeOf for $ty {
                 #[inline(always)]
                 fn size_of(&self, _: &mut $crate::MallocSizeOfOps) -> usize {