mirror of
https://github.com/servo/servo.git
synced 2025-10-06 03:29:25 +01:00
auto merge of #2649 : ebalint/servo/2580_JS_T_unrooted_replace, r=jdm
removed .clone() calls modified from_rooted method parameter: T to &T
This commit is contained in:
commit
7ed5041891
20 changed files with 51 additions and 53 deletions
|
@ -571,8 +571,8 @@ impl ScriptTask {
|
|||
// Create the root frame.
|
||||
let mut frame = page.mut_frame();
|
||||
*frame = Some(Frame {
|
||||
document: document.deref().unrooted(),
|
||||
window: window.deref().unrooted(),
|
||||
document: JS::from_rooted(document.deref()),
|
||||
window: JS::from_rooted(window.deref()),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -777,12 +777,12 @@ impl ScriptTask {
|
|||
match *mouse_over_targets {
|
||||
Some(ref mouse_over_targets) => {
|
||||
if !target_compare {
|
||||
target_compare = !mouse_over_targets.contains(&node.unrooted());
|
||||
target_compare = !mouse_over_targets.contains(&JS::from_rooted(&node));
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
target_list.push(node.unrooted());
|
||||
target_list.push(JS::from_rooted(&node));
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue