aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorTetsuharu OHZEKI <saneyuki.snyk@gmail.com>2014-10-21 02:03:02 +0900
committerTetsuharu OHZEKI <saneyuki.snyk@gmail.com>2014-10-22 10:01:01 +0900
commit36d8dc5a425d79fb9ce33f2fd9fe4bef385a18f6 (patch)
treeff5b35c90b56b6708d1ef8530f8b997f8fa61639 /components/script/dom
parent7e7c610837b0c4a9b12ba885d88f760121c20848 (diff)
downloadservo-36d8dc5a425d79fb9ce33f2fd9fe4bef385a18f6.tar.gz
servo-36d8dc5a425d79fb9ce33f2fd9fe4bef385a18f6.zip
Use DOMRefCell for Window.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/window.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 044a6f6fabe..d2b6cf8b75d 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use dom::bindings::cell::{DOMRefCell, Ref};
use dom::bindings::codegen::Bindings::EventHandlerBinding::{OnErrorEventHandlerNonNull, EventHandlerNonNull};
use dom::bindings::codegen::Bindings::WindowBinding;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
@@ -39,7 +40,6 @@ use url::{Url, UrlParser};
use libc;
use serialize::base64::{FromBase64, ToBase64, STANDARD};
-use std::cell::{Ref, RefCell};
use std::default::Default;
use std::rc::Rc;
use time;
@@ -54,7 +54,7 @@ pub struct Window {
navigator: MutNullableJS<Navigator>,
image_cache_task: ImageCacheTask,
compositor: Box<ScriptListener+'static>,
- browser_context: RefCell<Option<BrowserContext>>,
+ browser_context: DOMRefCell<Option<BrowserContext>>,
page: Rc<Page>,
performance: MutNullableJS<Performance>,
navigation_start: u64,
@@ -437,7 +437,7 @@ impl Window {
location: Default::default(),
navigator: Default::default(),
image_cache_task: image_cache_task,
- browser_context: RefCell::new(None),
+ browser_context: DOMRefCell::new(None),
performance: Default::default(),
navigation_start: time::get_time().sec as u64,
navigation_start_precise: time::precise_time_s(),