mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use DOMRefCell for Window.
This commit is contained in:
parent
7e7c610837
commit
36d8dc5a42
1 changed files with 3 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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::EventHandlerBinding::{OnErrorEventHandlerNonNull, EventHandlerNonNull};
|
||||||
use dom::bindings::codegen::Bindings::WindowBinding;
|
use dom::bindings::codegen::Bindings::WindowBinding;
|
||||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||||
|
@ -39,7 +40,6 @@ use url::{Url, UrlParser};
|
||||||
|
|
||||||
use libc;
|
use libc;
|
||||||
use serialize::base64::{FromBase64, ToBase64, STANDARD};
|
use serialize::base64::{FromBase64, ToBase64, STANDARD};
|
||||||
use std::cell::{Ref, RefCell};
|
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use time;
|
use time;
|
||||||
|
@ -54,7 +54,7 @@ pub struct Window {
|
||||||
navigator: MutNullableJS<Navigator>,
|
navigator: MutNullableJS<Navigator>,
|
||||||
image_cache_task: ImageCacheTask,
|
image_cache_task: ImageCacheTask,
|
||||||
compositor: Box<ScriptListener+'static>,
|
compositor: Box<ScriptListener+'static>,
|
||||||
browser_context: RefCell<Option<BrowserContext>>,
|
browser_context: DOMRefCell<Option<BrowserContext>>,
|
||||||
page: Rc<Page>,
|
page: Rc<Page>,
|
||||||
performance: MutNullableJS<Performance>,
|
performance: MutNullableJS<Performance>,
|
||||||
navigation_start: u64,
|
navigation_start: u64,
|
||||||
|
@ -437,7 +437,7 @@ impl Window {
|
||||||
location: Default::default(),
|
location: Default::default(),
|
||||||
navigator: Default::default(),
|
navigator: Default::default(),
|
||||||
image_cache_task: image_cache_task,
|
image_cache_task: image_cache_task,
|
||||||
browser_context: RefCell::new(None),
|
browser_context: DOMRefCell::new(None),
|
||||||
performance: Default::default(),
|
performance: Default::default(),
|
||||||
navigation_start: time::get_time().sec as u64,
|
navigation_start: time::get_time().sec as u64,
|
||||||
navigation_start_precise: time::precise_time_s(),
|
navigation_start_precise: time::precise_time_s(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue