aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r--src/components/script/dom/document.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs
index e2984a1bf82..d0ffb203282 100644
--- a/src/components/script/dom/document.rs
+++ b/src/components/script/dom/document.rs
@@ -660,8 +660,9 @@ impl Document {
pub fn Location(&mut self, _abstract_self: &JSRef<Document>) -> Unrooted<Location> {
let roots = RootCollection::new();
- let window = self.window.root(&roots);
- self.window.get_mut().Location(&*window)
+ let mut window = self.window.root(&roots);
+ let window_alias = self.window.root(&roots);
+ window.get_mut().Location(&*window_alias)
}
pub fn Children(&self, abstract_self: &JSRef<Document>) -> Unrooted<HTMLCollection> {
@@ -695,11 +696,13 @@ impl Document {
}
pub fn damage_and_reflow(&self, damage: DocumentDamageLevel) {
- self.window.get().damage_and_reflow(damage);
+ let roots = RootCollection::new();
+ self.window.root(&roots).damage_and_reflow(damage);
}
pub fn wait_until_safe_to_modify_dom(&self) {
- self.window.get().wait_until_safe_to_modify_dom();
+ let roots = RootCollection::new();
+ self.window.root(&roots).wait_until_safe_to_modify_dom();
}