Replace uses of JS<T>.unrooted() with JS::from_rooted #2580

This commit is contained in:
Edit Balint 2014-06-13 14:58:38 +02:00
parent da668f53d9
commit bda29ade09
20 changed files with 51 additions and 53 deletions

View file

@ -972,8 +972,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()),
});
}
@ -1178,12 +1178,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 => {}
}