mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Measure heap memory usage for more types. Fixes #6951
This commit is contained in:
parent
94c8dcd575
commit
45145108da
175 changed files with 669 additions and 94 deletions
|
@ -13,7 +13,7 @@ use dom::window::Window;
|
|||
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[must_root]
|
||||
pub enum NodeListType {
|
||||
Simple(Vec<JS<Node>>),
|
||||
|
@ -22,6 +22,7 @@ pub enum NodeListType {
|
|||
|
||||
// https://dom.spec.whatwg.org/#interface-nodelist
|
||||
#[dom_struct]
|
||||
#[derive(HeapSizeOf)]
|
||||
pub struct NodeList {
|
||||
reflector_: Reflector,
|
||||
list_type: NodeListType,
|
||||
|
@ -93,10 +94,11 @@ impl<'a> NodeListHelpers<'a> for &'a NodeList {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[must_root]
|
||||
pub struct ChildrenList {
|
||||
node: JS<Node>,
|
||||
#[ignore_heap_size_of = "Defined in rust-mozjs"]
|
||||
last_visited: MutNullableHeap<JS<Node>>,
|
||||
last_index: Cell<u32>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue