mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Don't allow unrooted values in function arguments.
This commit is contained in:
parent
81ecf7824c
commit
a9ef40c716
4 changed files with 17 additions and 10 deletions
|
@ -27,6 +27,7 @@ pub struct NodeList {
|
|||
}
|
||||
|
||||
impl NodeList {
|
||||
#[allow(unrooted_must_root)]
|
||||
fn new_inherited(list_type: NodeListType) -> NodeList {
|
||||
NodeList {
|
||||
reflector_: Reflector::new(),
|
||||
|
@ -34,6 +35,7 @@ impl NodeList {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(window: &Window,
|
||||
list_type: NodeListType) -> Root<NodeList> {
|
||||
reflect_dom_object(box NodeList::new_inherited(list_type),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue