Reorder LayoutTask::exit_now for clarity.

This commit is contained in:
Ms2ger 2015-11-05 14:20:25 +01:00
parent e2385c8c0e
commit 61983323ae

View file

@ -731,8 +731,6 @@ impl LayoutTask {
fn exit_now<'a>(&'a self,
possibly_locked_rw_data: &mut Option<MutexGuard<'a, LayoutTaskData>>,
exit_type: PipelineExitType) {
let (response_chan, response_port) = ipc::channel().unwrap();
{
let mut rw_data = self.lock_rw_data(possibly_locked_rw_data);
if let Some(ref mut traversal) = (&mut *rw_data).parallel_traversal {
@ -741,6 +739,7 @@ impl LayoutTask {
LayoutTask::return_rw_data(possibly_locked_rw_data, rw_data);
}
let (response_chan, response_port) = ipc::channel().unwrap();
self.paint_chan.send(LayoutToPaintMsg::Exit(Some(response_chan), exit_type)).unwrap();
response_port.recv().unwrap()
}