aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-07-21 07:37:24 -0600
committerJack Moffitt <jack@metajack.im>2014-08-02 21:11:47 -0600
commitb91e6f30e063cbcea4ffd750da8385ce448de797 (patch)
tree3e762f7866e29379810ac1e612f7942979e21b87 /src/components/script/script_task.rs
parent8b6f62c195dd7e42d0b6a18f2ced6fa16bc29faa (diff)
downloadservo-b91e6f30e063cbcea4ffd750da8385ce448de797.tar.gz
servo-b91e6f30e063cbcea4ffd750da8385ce448de797.zip
Upgrade Rust.
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index 87ae7a4752e..9b31c8b0dfc 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -45,17 +45,16 @@ use servo_msg::constellation_msg;
use servo_net::image_cache_task::ImageCacheTask;
use servo_net::resource_task::ResourceTask;
use servo_util::geometry::to_frac_px;
-use servo_util::task::send_on_failure;
+use servo_util::task::spawn_named_with_send_on_failure;
use std::cell::RefCell;
use std::comm::{channel, Sender, Receiver};
use std::mem::replace;
use std::rc::Rc;
-use std::task::TaskBuilder;
use url::Url;
use serialize::{Encoder, Encodable};
-local_data_key!(pub StackRoots: *RootCollection)
+local_data_key!(pub StackRoots: *const RootCollection)
/// Messages used to control the script task.
pub enum ScriptMsg {
@@ -116,7 +115,7 @@ pub struct StackRootTLS;
impl StackRootTLS {
pub fn new(roots: &RootCollection) -> StackRootTLS {
- StackRoots.replace(Some(roots as *RootCollection));
+ StackRoots.replace(Some(roots as *const RootCollection));
StackRootTLS
}
}
@@ -287,10 +286,8 @@ impl ScriptTask {
resource_task: ResourceTask,
image_cache_task: ImageCacheTask,
window_size: WindowSizeData) {
- let mut builder = TaskBuilder::new().named("ScriptTask");
let ConstellationChan(const_chan) = constellation_chan.clone();
- send_on_failure(&mut builder, FailureMsg(failure_msg), const_chan);
- builder.spawn(proc() {
+ spawn_named_with_send_on_failure("ScriptTask", proc() {
let script_task = ScriptTask::new(id,
compositor as Box<ScriptListener>,
layout_chan,
@@ -305,7 +302,7 @@ impl ScriptTask {
// This must always be the very last operation performed before the task completes
failsafe.neuter();
- });
+ }, FailureMsg(failure_msg), const_chan);
}
/// Handle incoming control messages.