mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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:
commit
11ba79894a
131 changed files with 345 additions and 28 deletions
|
@ -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>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue