aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/nodelist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/nodelist.rs')
-rw-r--r--components/script/dom/nodelist.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs
index 424eb09416c..0ebd2e0db25 100644
--- a/components/script/dom/nodelist.rs
+++ b/components/script/dom/nodelist.rs
@@ -11,18 +11,21 @@ use dom::node::{Node, NodeHelpers};
use dom::window::Window;
#[deriving(Encodable)]
+#[must_root]
pub enum NodeListType {
Simple(Vec<JS<Node>>),
Children(JS<Node>)
}
#[deriving(Encodable)]
+#[must_root]
pub struct NodeList {
list_type: NodeListType,
reflector_: Reflector,
}
impl NodeList {
+ #[allow(unrooted_must_root)]
pub fn new_inherited(list_type: NodeListType) -> NodeList {
NodeList {
list_type: list_type,
@@ -30,6 +33,7 @@ impl NodeList {
}
}
+ #[allow(unrooted_must_root)]
pub fn new(window: &JSRef<Window>,
list_type: NodeListType) -> Temporary<NodeList> {
reflect_dom_object(box NodeList::new_inherited(list_type),