mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Rename Reflectable
to DomObject
.
Fixes https://github.com/servo/servo/issues/8473.
This commit is contained in:
parent
0fe94a6724
commit
449f6337d4
72 changed files with 168 additions and 168 deletions
|
@ -5,7 +5,7 @@
|
|||
//! Routines for handling measuring the memory usage of arbitrary DOM nodes.
|
||||
|
||||
use dom::bindings::conversions::get_dom_class;
|
||||
use dom::bindings::reflector::Reflectable;
|
||||
use dom::bindings::reflector::DomObject;
|
||||
use heapsize::{HeapSizeOf, heap_size_of};
|
||||
use std::os::raw::c_void;
|
||||
|
||||
|
@ -13,7 +13,7 @@ use std::os::raw::c_void;
|
|||
// associated box in order to stash their pointers in a reserved slot of their
|
||||
// JS reflector.
|
||||
#[allow(unsafe_code)]
|
||||
pub fn heap_size_of_self_and_children<T: Reflectable + HeapSizeOf>(obj: &T) -> usize {
|
||||
pub fn heap_size_of_self_and_children<T: DomObject + HeapSizeOf>(obj: &T) -> usize {
|
||||
unsafe {
|
||||
let class = get_dom_class(obj.reflector().get_jsobject().get()).unwrap();
|
||||
(class.heap_size_of)(obj as *const T as *const c_void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue