aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-09-16 01:28:36 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-09-16 22:11:27 +0530
commit12dc54d23849f6bc90667e2df432e30587e4af49 (patch)
tree6b3a8ba1d1bd343ec65108e7b5f67ff1a4154311 /components/script/dom/htmlcollection.rs
parent13ae369dec3f02b5f992f1c6c276cde646ef39e9 (diff)
downloadservo-12dc54d23849f6bc90667e2df432e30587e4af49.tar.gz
servo-12dc54d23849f6bc90667e2df432e30587e4af49.zip
Add unrooted_must_root lint for enums and structs containing JS<T>, as well as functions with JS<T> in their parameter list
For safe wrappers over JS<T> (eg Temporary<T>) use #[allow(unrooted_must_root)]. For all other types containing a #[must_root] value, annotate the type with #[must_root] to ensure that it is never used unrooted
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r--components/script/dom/htmlcollection.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs
index 5bef6c56ff5..bd07b82e53e 100644
--- a/components/script/dom/htmlcollection.rs
+++ b/components/script/dom/htmlcollection.rs
@@ -30,12 +30,14 @@ impl<S: Encoder<E>, E> Encodable<S, E> for Box<CollectionFilter> {
}
#[deriving(Encodable)]
+#[must_root]
pub enum CollectionTypeId {
Static(Vec<JS<Element>>),
Live(JS<Node>, Box<CollectionFilter>)
}
#[deriving(Encodable)]
+#[must_root]
pub struct HTMLCollection {
collection: CollectionTypeId,
reflector_: Reflector,