Merge pull request #3374 from Manishearth/lint_unrooted_jsmanaged

Add lint for ensuring proper rooting of JS<T>; r=jdm
This commit is contained in:
Manish Goregaokar 2014-09-17 18:17:19 +05:30
commit 11ba79894a
131 changed files with 345 additions and 28 deletions

View file

@ -68,6 +68,7 @@ use serialize::{Encoder, Encodable};
/// An HTML node.
#[deriving(Encodable)]
#[must_root]
pub struct Node {
/// The JavaScript reflector for this node.
pub eventtarget: EventTarget,
@ -852,6 +853,7 @@ impl<'a> Iterator<JSRef<'a, Node>> for TreeIterator<'a> {
}
}
#[must_root]
pub struct NodeIterator {
pub start_node: JS<Node>,
pub current_node: Option<JS<Node>>,