mirror of
https://github.com/servo/servo.git
synced 2025-10-08 04:29:24 +01:00
Make dictionaries contain Root<T> values instead of JS<T>, ensuring that they will not be collected while the dictionary is alive.
This commit is contained in:
parent
0f2d0b1dc3
commit
895e9ee37f
5 changed files with 20 additions and 11 deletions
|
@ -46,9 +46,8 @@ impl UIEvent {
|
|||
type_: DOMString,
|
||||
init: &UIEventBinding::UIEventInit) -> Fallible<Temporary<UIEvent>> {
|
||||
let mut ev = UIEvent::new(owner).root();
|
||||
let view = init.view.as_ref().map(|view| view.root());
|
||||
ev.InitUIEvent(type_, init.parent.bubbles, init.parent.cancelable,
|
||||
view.root_ref(), init.detail);
|
||||
init.view.root_ref(), init.detail);
|
||||
Ok(Temporary::from_rooted(&*ev))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue