aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/pipeline.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-03-19 12:35:17 -0400
committerbors-servo <release+servo@mozilla.com>2014-03-19 12:35:17 -0400
commitf7aa6e3d9b8bfcc0565624f1094241b3b8658bd8 (patch)
tree7e7fbd7976c3da12ff463d6ffbeb1a3a336ae7d3 /src/components/main/pipeline.rs
parentcaf1ed94468da3c134cc8e8f4a1b934bb353dc19 (diff)
parenta6100563a6e43471ae43fb155113bc2026992f78 (diff)
downloadservo-f7aa6e3d9b8bfcc0565624f1094241b3b8658bd8.tar.gz
servo-f7aa6e3d9b8bfcc0565624f1094241b3b8658bd8.zip
auto merge of #1934 : larsbergstrom/servo/rust_20140224_squashed, r=jdm
For review only - don't approve yet (need to squash and land submodule updates first). critic? @metajack
Diffstat (limited to 'src/components/main/pipeline.rs')
-rw-r--r--src/components/main/pipeline.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs
index 14e55e54f50..77782342c12 100644
--- a/src/components/main/pipeline.rs
+++ b/src/components/main/pipeline.rs
@@ -20,9 +20,7 @@ use servo_net::resource_task::ResourceTask;
use servo_util::opts::Opts;
use servo_util::time::ProfilerChan;
use std::cell::RefCell;
-//FIXME: switch to std::rc when we upgrade Rust
-use layers::temp_rc::Rc;
-//use std::rc::Rc;
+use std::rc::Rc;
/// A uniquely-identifiable pipeline of script task, layout task, and render task.
pub struct Pipeline {
@@ -94,7 +92,8 @@ impl Pipeline {
layout_chan: layout_chan.clone(),
};
- script_pipeline.borrow().script_chan.send(AttachLayoutMsg(new_layout_info));
+ let ScriptChan(ref chan) = script_pipeline.borrow().script_chan;
+ chan.send(AttachLayoutMsg(new_layout_info));
Pipeline::new(id,
subpage_id,
@@ -190,16 +189,17 @@ impl Pipeline {
pub fn load(&self, url: Url) {
self.url.set(Some(url.clone()));
- self.script_chan.send(LoadMsg(self.id, url));
+ let ScriptChan(ref chan) = self.script_chan;
+ chan.send(LoadMsg(self.id, url));
}
pub fn grant_paint_permission(&self) {
- self.render_chan.try_send(PaintPermissionGranted);
+ self.render_chan.chan.try_send(PaintPermissionGranted);
}
pub fn revoke_paint_permission(&self) {
debug!("pipeline revoking render channel paint permission");
- self.render_chan.try_send(PaintPermissionRevoked);
+ self.render_chan.chan.try_send(PaintPermissionRevoked);
}
pub fn reload(&self) {
@@ -211,7 +211,8 @@ impl Pipeline {
pub fn exit(&self) {
// Script task handles shutting down layout, and layout handles shutting down the renderer.
// For now, if the script task has failed, we give up on clean shutdown.
- if self.script_chan.try_send(script_task::ExitPipelineMsg(self.id)) {
+ let ScriptChan(ref chan) = self.script_chan;
+ if chan.try_send(script_task::ExitPipelineMsg(self.id)) {
// Wait until all slave tasks have terminated and run destructors
// NOTE: We don't wait for script task as we don't always own it
self.render_shutdown_port.recv_opt();