From 45145108daa6af7e834a7c23530857c504b54b9c Mon Sep 17 00:00:00 2001 From: Bogdan Cuza Date: Wed, 5 Aug 2015 18:31:42 +0300 Subject: Measure heap memory usage for more types. Fixes #6951 --- components/script/dom/nodelist.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'components/script/dom/nodelist.rs') diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs index 0c6583a684d..bcf941a6aa0 100644 --- a/components/script/dom/nodelist.rs +++ b/components/script/dom/nodelist.rs @@ -13,7 +13,7 @@ use dom::window::Window; use std::cell::Cell; -#[derive(JSTraceable)] +#[derive(JSTraceable, HeapSizeOf)] #[must_root] pub enum NodeListType { Simple(Vec>), @@ -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, + #[ignore_heap_size_of = "Defined in rust-mozjs"] last_visited: MutNullableHeap>, last_index: Cell, } -- cgit v1.2.3