Remove mozjs dep from malloc_size_of.

This commit is contained in:
Josh Matthews 2019-03-27 14:18:18 -04:00
parent 0a5aab6cc2
commit 57d2b5a92d
21 changed files with 30 additions and 16 deletions

View file

@ -58,8 +58,6 @@ extern crate hyper;
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;
@ -798,15 +796,6 @@ impl<Static: string_cache::StaticAtomSet> MallocSizeOf for string_cache::Atom<St
}
}
// 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(