aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index c64e7a10fc5..3cc121da0ff 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -2,26 +2,25 @@
* 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/. */
-#![feature(globs, macro_rules, phase, thread_local)]
+#![feature(thread_local)]
#![deny(unused_imports)]
#![deny(unused_variables)]
#![allow(missing_copy_implementations)]
-#[phase(plugin, link)]
+#[macro_use]
extern crate log;
extern crate compositing;
extern crate devtools;
extern crate "net" as servo_net;
extern crate "msg" as servo_msg;
-#[phase(plugin, link)]
+#[macro_use]
extern crate "util" as servo_util;
extern crate script;
extern crate layout;
extern crate gfx;
extern crate libc;
-extern crate rustrt;
extern crate url;
use compositing::CompositorEventListener;
@@ -41,7 +40,7 @@ use servo_net::image_cache_task::ImageCacheTask;
#[cfg(not(test))]
use servo_net::resource_task::new_resource_task;
#[cfg(not(test))]
-use servo_net::storage_task::StorageTaskFactory;
+use servo_net::storage_task::{StorageTaskFactory, StorageTask};
#[cfg(not(test))]
use gfx::font_cache_task::FontCacheTask;
#[cfg(not(test))]
@@ -58,7 +57,9 @@ use std::os;
#[cfg(not(test))]
use std::rc::Rc;
#[cfg(not(test))]
-use std::task::TaskBuilder;
+use std::sync::mpsc::channel;
+#[cfg(not(test))]
+use std::thread::Builder;
pub struct Browser<Window> {
compositor: Box<CompositorEventListener + 'static>,
@@ -86,8 +87,8 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
let (result_chan, result_port) = channel();
let compositor_proxy_for_constellation = compositor_proxy.clone_compositor_proxy();
- TaskBuilder::new()
- .spawn(proc() {
+ Builder::new()
+ .spawn(move || {
let opts = &opts_clone;
// Create a Servo instance.
let resource_task = new_resource_task(opts.user_agent.clone());
@@ -100,7 +101,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
ImageCacheTask::new(resource_task.clone(), shared_task_pool)
};
let font_cache_task = FontCacheTask::new(resource_task.clone());
- let storage_task = StorageTaskFactory::new();
+ let storage_task: StorageTask = StorageTaskFactory::new();
let constellation_chan = Constellation::<layout::layout_task::LayoutTask,
script::script_task::ScriptTask>::start(
compositor_proxy_for_constellation,
@@ -129,7 +130,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
result_chan.send(constellation_chan);
});
- let constellation_chan = result_port.recv();
+ let constellation_chan = result_port.recv().unwrap();
debug!("preparing to enter main loop");
let compositor = CompositorTask::create(window,