mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Add accountable-refcell as optional build time feature
This commit is contained in:
parent
bd636b0e6c
commit
02c1612cb0
29 changed files with 69 additions and 44 deletions
|
@ -22,10 +22,12 @@ servo = [
|
|||
"webrender_api",
|
||||
"xml5ever",
|
||||
"content-security-policy",
|
||||
"uuid"
|
||||
"uuid",
|
||||
"accountable-refcell",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
accountable-refcell = { version = "0.2.0", optional = true }
|
||||
app_units = "0.7"
|
||||
content-security-policy = {version = "0.3.0", features = ["serde"], optional = true}
|
||||
crossbeam-channel = { version = "0.3", optional = true }
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
//! Note: WebRender has a reduced fork of this crate, so that we can avoid
|
||||
//! publishing this crate on crates.io.
|
||||
|
||||
extern crate accountable_refcell;
|
||||
extern crate app_units;
|
||||
#[cfg(feature = "servo")]
|
||||
extern crate content_security_policy;
|
||||
|
@ -970,3 +971,10 @@ impl<T: MallocSizeOf> DerefMut for Measurable<T> {
|
|||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl<T: MallocSizeOf> MallocSizeOf for accountable_refcell::RefCell<T> {
|
||||
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
|
||||
self.borrow().size_of(ops)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue