auto merge of #4911 : Ms2ger/servo/join_layout, r=jdm

This commit is contained in:
bors-servo 2015-02-13 02:24:50 -07:00
commit c5a4e78302

View file

@ -327,10 +327,7 @@ impl Page {
/// layout task has finished any pending request messages. /// layout task has finished any pending request messages.
fn join_layout(&self) { fn join_layout(&self) {
let mut layout_join_port = self.layout_join_port.borrow_mut(); let mut layout_join_port = self.layout_join_port.borrow_mut();
if layout_join_port.is_some() { if let Some(join_port) = replace(&mut *layout_join_port, None) {
let join_port = replace(&mut *layout_join_port, None);
match join_port {
Some(ref join_port) => {
match join_port.try_recv() { match join_port.try_recv() {
Err(Empty) => { Err(Empty) => {
info!("script: waiting on layout"); info!("script: waiting on layout");
@ -344,9 +341,6 @@ impl Page {
debug!("script: layout joined") debug!("script: layout joined")
} }
None => panic!("reader forked but no join port?"),
}
}
} }
/// Reflows the page if it's possible to do so and the page is dirty. This method will wait /// Reflows the page if it's possible to do so and the page is dirty. This method will wait