mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Make uuid optional and hide it behind servo feature in malloc_size_of
This commit is contained in:
parent
d60f7d87c8
commit
a892102d46
2 changed files with 8 additions and 2 deletions
|
@ -22,6 +22,7 @@ servo = [
|
|||
"webrender_api",
|
||||
"xml5ever",
|
||||
"content-security-policy",
|
||||
"uuid"
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
|
@ -47,4 +48,4 @@ url = { version = "2.0", optional = true }
|
|||
webrender_api = { git = "https://github.com/servo/webrender", optional = true }
|
||||
xml5ever = { version = "0.16", optional = true }
|
||||
void = "1.0.2"
|
||||
uuid = {version = "0.8", features = ["v4", "serde"]}
|
||||
uuid = {version = "0.8", features = ["v4"], optional = true}
|
||||
|
|
|
@ -75,6 +75,7 @@ extern crate thin_slice;
|
|||
extern crate time;
|
||||
#[cfg(feature = "url")]
|
||||
extern crate url;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate uuid;
|
||||
extern crate void;
|
||||
#[cfg(feature = "webrender_api")]
|
||||
|
@ -91,6 +92,7 @@ use std::mem::size_of;
|
|||
use std::ops::Range;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::os::raw::c_void;
|
||||
#[cfg(feature = "servo")]
|
||||
use uuid::Uuid;
|
||||
use void::Void;
|
||||
|
||||
|
@ -822,7 +824,7 @@ macro_rules! malloc_size_of_is_0(
|
|||
);
|
||||
);
|
||||
|
||||
malloc_size_of_is_0!(bool, char, str, Uuid);
|
||||
malloc_size_of_is_0!(bool, char, str);
|
||||
malloc_size_of_is_0!(u8, u16, u32, u64, u128, usize);
|
||||
malloc_size_of_is_0!(i8, i16, i32, i64, i128, isize);
|
||||
malloc_size_of_is_0!(f32, f64);
|
||||
|
@ -842,6 +844,9 @@ malloc_size_of_is_0!(cssparser::RGBA, cssparser::TokenSerializationType);
|
|||
#[cfg(feature = "servo")]
|
||||
malloc_size_of_is_0!(csp::Destination);
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
malloc_size_of_is_0!(Uuid);
|
||||
|
||||
#[cfg(feature = "url")]
|
||||
impl MallocSizeOf for url::Host {
|
||||
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue