From 67e7436cb81cbea41b51bb9e8d581e647cf5bcc4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 10 Jun 2015 21:18:39 -0700 Subject: [PATCH] Ignore CollectReport messages when shutting down the LayoutTask. 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. --- components/layout/layout_task.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 4fd06ecbe02..2756780dfb2 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -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`") } } }