mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -18,6 +18,7 @@ use servo_util::str::DOMString;
|
|||
use style::Stylesheet;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLStyleElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
}
|
||||
|
@ -35,6 +36,7 @@ impl HTMLStyleElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLStyleElement> {
|
||||
let element = HTMLStyleElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue