Skip to content

Commit

Permalink
Auto merge of #6335 - nnethercote:fix-layout-task-shutdown-panic, r=m…
Browse files Browse the repository at this point in the history
…etajack

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 -->
  • Loading branch information
bors-servo committed Jun 11, 2015
2 parents 37fcced + 67e7436 commit 74ef31c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/layout/layout_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,11 @@ impl LayoutTask {
self.exit_now(possibly_locked_rw_data, exit_type);
break
}
Msg::CollectReports(_) => {
// Just ignore these messages at this point.
}
_ => {
panic!("layout: message that wasn't `ExitNow` received after \
`PrepareToExitMsg`")
panic!("layout: unexpected message received after `PrepareToExitMsg`")
}
}
}
Expand Down

0 comments on commit 74ef31c

Please sign in to comment.