aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/page.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-02-12 22:42:06 +0100
committerMs2ger <ms2ger@gmail.com>2015-02-12 22:42:06 +0100
commit79914e560f1ce4b1510fe4fa7971ec2109e9251e (patch)
treeb6055f71f8066b48ce3d846621c34199a55c5d4f /components/script/page.rs
parentb351b216c6ac5df1913ddd589d3300d7cd07ebb0 (diff)
downloadservo-79914e560f1ce4b1510fe4fa7971ec2109e9251e.tar.gz
servo-79914e560f1ce4b1510fe4fa7971ec2109e9251e.zip
Cleanup join_layout a little bit.
Diffstat (limited to 'components/script/page.rs')
-rw-r--r--components/script/page.rs30
1 files changed, 14 insertions, 16 deletions
diff --git a/components/script/page.rs b/components/script/page.rs
index 55729fd3591..2d85f9db9b5 100644
--- a/components/script/page.rs
+++ b/components/script/page.rs
@@ -327,25 +327,23 @@ impl Page {
/// layout task has finished any pending request messages.
fn join_layout(&self) {
let mut layout_join_port = self.layout_join_port.borrow_mut();
- if layout_join_port.is_some() {
- let join_port = replace(&mut *layout_join_port, None);
- match join_port {
- Some(ref join_port) => {
- match join_port.try_recv() {
- Err(Empty) => {
- info!("script: waiting on layout");
- join_port.recv().unwrap();
- }
- Ok(_) => {}
- Err(Disconnected) => {
- panic!("Layout task failed while script was waiting for a result.");
- }
+ let join_port = replace(&mut *layout_join_port, None);
+ match join_port {
+ Some(ref join_port) => {
+ match join_port.try_recv() {
+ Err(Empty) => {
+ info!("script: waiting on layout");
+ join_port.recv().unwrap();
+ }
+ Ok(_) => {}
+ Err(Disconnected) => {
+ panic!("Layout task failed while script was waiting for a result.");
}
-
- debug!("script: layout joined")
}
- None => panic!("reader forked but no join port?"),
+
+ debug!("script: layout joined")
}
+ None => (),
}
}