diff options
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r-- | src/components/script/script_task.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index f28044a7102..dde4fbb8741 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -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 => {} } |