mirror of
https://github.com/servo/servo.git
synced 2025-07-30 10:40:27 +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
|
@ -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