Auto merge of #6335 - nnethercote:fix-layout-task-shutdown-panic, r=metajack

Prior to this change, a panic would occur if a CollectReport message was
received while the LayoutTask was shutting down. Now it just gets
ignored.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6335)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-06-11 00:58:41 -06:00
commit 74ef31cfc4

View file

@ -601,9 +601,11 @@ impl LayoutTask {
self.exit_now(possibly_locked_rw_data, exit_type); self.exit_now(possibly_locked_rw_data, exit_type);
break break
} }
Msg::CollectReports(_) => {
// Just ignore these messages at this point.
}
_ => { _ => {
panic!("layout: message that wasn't `ExitNow` received after \ panic!("layout: unexpected message received after `PrepareToExitMsg`")
`PrepareToExitMsg`")
} }
} }
} }