aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/browsercontext.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-10-17 02:03:55 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-10-17 02:07:52 +0200
commit1f31d5b856ba33a32336f0c24e658f0bac21eede (patch)
treec8c186c6a9b3fcfc8e66c0d5f46515b795f4ca8a /components/script/dom/browsercontext.rs
parent6c7f37061b5c356c4d045bfd23b33e84220e39f9 (diff)
downloadservo-1f31d5b856ba33a32336f0c24e658f0bac21eede.tar.gz
servo-1f31d5b856ba33a32336f0c24e658f0bac21eede.zip
Return a reference in BrowserContext::active_document()
Diffstat (limited to 'components/script/dom/browsercontext.rs')
-rw-r--r--components/script/dom/browsercontext.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/browsercontext.rs b/components/script/dom/browsercontext.rs
index af2bfbdc81e..87d90f8e64f 100644
--- a/components/script/dom/browsercontext.rs
+++ b/components/script/dom/browsercontext.rs
@@ -44,13 +44,12 @@ impl BrowsingContext {
}
}
- pub fn active_document(&self) -> Root<Document> {
- self.history[self.active_index].document.root()
+ pub fn active_document(&self) -> &Document {
+ &*self.history[self.active_index].document
}
pub fn active_window(&self) -> Root<Window> {
- let doc = self.active_document();
- doc.r().window()
+ self.active_document().window()
}
pub fn frame_element(&self) -> Option<Root<Element>> {