mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Bump heapsize to 0.3
This commit is contained in:
parent
26a82a6338
commit
55dcee94be
21 changed files with 106 additions and 116 deletions
|
@ -70,7 +70,7 @@ cssparser = {version = "0.5.3", features = ["heap_size", "serde-serialization"]}
|
|||
encoding = "0.2"
|
||||
euclid = {version = "0.6.2", features = ["plugins"]}
|
||||
fnv = "1.0"
|
||||
heapsize = "0.2.5"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]}
|
||||
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||
|
|
|
@ -36,6 +36,7 @@ use js::{JS_CALLEE};
|
|||
use libc::{self, c_uint};
|
||||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
use std::os::raw::c_void;
|
||||
use std::ptr;
|
||||
use util::non_geckolib::jsstring_to_str;
|
||||
|
||||
|
@ -91,7 +92,7 @@ pub struct DOMClass {
|
|||
pub type_id: TopTypeId,
|
||||
|
||||
/// The HeapSizeOf function wrapper for that interface.
|
||||
pub heap_size_of: unsafe fn(*const libc::c_void) -> usize,
|
||||
pub heap_size_of: unsafe fn(*const c_void) -> usize,
|
||||
}
|
||||
unsafe impl Sync for DOMClass {}
|
||||
|
||||
|
|
|
@ -2446,7 +2446,7 @@ impl HeapSizeOf for UniqueId {
|
|||
#[allow(unsafe_code)]
|
||||
fn heap_size_of_children(&self) -> usize {
|
||||
if let &Some(ref uuid) = unsafe { &*self.cell.get() } {
|
||||
heap_size_of(&** uuid as *const Uuid as *const c_void)
|
||||
unsafe { heap_size_of(&** uuid as *const Uuid as *const _) }
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
use dom::bindings::conversions::get_dom_class;
|
||||
use dom::bindings::reflector::Reflectable;
|
||||
use heapsize::{HeapSizeOf, heap_size_of};
|
||||
use libc::c_void;
|
||||
use std::os::raw::c_void;
|
||||
|
||||
// This is equivalent to measuring a Box<T>, except that DOM objects lose their
|
||||
// associated box in order to stash their pointers in a reserved slot of their
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue