mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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
|
@ -32,6 +32,7 @@ pub struct HTMLCollection {
|
|||
}
|
||||
|
||||
impl HTMLCollection {
|
||||
#[allow(unrooted_must_root)]
|
||||
fn new_inherited(collection: Collection) -> HTMLCollection {
|
||||
HTMLCollection {
|
||||
reflector_: Reflector::new(),
|
||||
|
@ -39,6 +40,7 @@ impl HTMLCollection {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(window: &Window, collection: Collection) -> Root<HTMLCollection> {
|
||||
reflect_dom_object(box HTMLCollection::new_inherited(collection),
|
||||
GlobalRef::Window(window), HTMLCollectionBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue