servo: Merge #3374 - Add lint for ensuring proper rooting of JS<T>; r=jdm (from Manishearth:lint_unrooted_jsmanaged)
Source-Repo: https://github.com/servo/servo Source-Revision: 11ba79894a13ddaee4bfcdd64d23fd4b54a041f3
This commit is contained in:
@@ -19,6 +19,7 @@ use dom::nodelist::NodeList;
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct DocumentFragment {
|
||||
pub node: Node,
|
||||
}
|
||||
@@ -38,8 +39,8 @@ impl DocumentFragment {
|
||||
}
|
||||
|
||||
pub fn new(document: &JSRef<Document>) -> Temporary<DocumentFragment> {
|
||||
let node = DocumentFragment::new_inherited(document);
|
||||
Node::reflect_node(box node, document, DocumentFragmentBinding::Wrap)
|
||||
Node::reflect_node(box DocumentFragment::new_inherited(document),
|
||||
document, DocumentFragmentBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalRef) -> Fallible<Temporary<DocumentFragment>> {
|
||||
|
||||
Reference in New Issue
Block a user