mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +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
|
@ -23,6 +23,7 @@ use std::ascii::StrAsciiExt;
|
|||
use url::UrlParser;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLLinkElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
}
|
||||
|
@ -40,6 +41,7 @@ impl HTMLLinkElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLinkElement> {
|
||||
let element = HTMLLinkElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue