diff options
Diffstat (limited to 'components/script/dom/browsercontext.rs')
-rw-r--r-- | components/script/dom/browsercontext.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/browsercontext.rs b/components/script/dom/browsercontext.rs index 2b00f346c1e..60dbdc5523e 100644 --- a/components/script/dom/browsercontext.rs +++ b/components/script/dom/browsercontext.rs @@ -48,8 +48,8 @@ impl BrowsingContext { &*self.history[self.active_index].document } - pub fn active_window(&self) -> Root<Window> { - Root::from_ref(self.active_document().window()) + pub fn active_window(&self) -> &Window { + self.active_document().window() } pub fn frame_element(&self) -> Option<&Element> { @@ -63,8 +63,8 @@ impl BrowsingContext { #[allow(unsafe_code)] pub fn create_window_proxy(&mut self) { - let win = self.active_window(); - let win = win.r(); + // We inline self.active_window() because we can't borrow *self here. + let win = self.history[self.active_index].document.window(); let WindowProxyHandler(handler) = win.windowproxy_handler(); assert!(!handler.is_null()); |