From 8d665008f8daeb05688e86b542a49581a2f88b00 Mon Sep 17 00:00:00 2001 From: wartman4404 Date: Sun, 16 Aug 2015 17:28:21 -0500 Subject: [PATCH] Remove the DOMRefCell wrapper around Window::compositor. --- components/script/dom/window.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 1ed699f09b8..43e4ca6e642 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -68,7 +68,7 @@ use libc; use rustc_serialize::base64::{FromBase64, ToBase64, STANDARD}; use std::ascii::AsciiExt; use std::borrow::ToOwned; -use std::cell::{Cell, Ref, RefMut, RefCell}; +use std::cell::{Cell, Ref, RefCell}; use std::collections::HashSet; use std::default::Default; use std::ffi::CString; @@ -121,7 +121,7 @@ pub struct Window { #[ignore_heap_size_of = "channels are hard"] image_cache_chan: ImageCacheChan, #[ignore_heap_size_of = "TODO(#6911) newtypes containing unmeasurable types are hard"] - compositor: DOMRefCell>, + compositor: IpcSender, browsing_context: DOMRefCell>, page: Rc, performance: MutNullableHeap>, @@ -273,8 +273,8 @@ impl Window { &self.image_cache_task } - pub fn compositor<'a>(&'a self) -> RefMut<'a, IpcSender> { - self.compositor.borrow_mut() + pub fn compositor<'a>(&'a self) -> &'a IpcSender { + &self.compositor } pub fn browsing_context<'a>(&'a self) -> Ref<'a, Option> { @@ -1099,7 +1099,7 @@ impl Window { control_chan: control_chan, console: Default::default(), crypto: Default::default(), - compositor: DOMRefCell::new(compositor), + compositor: compositor, page: page, navigator: Default::default(), image_cache_task: image_cache_task,