aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2016-07-28 15:49:52 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2016-07-28 16:32:35 -0500
commit3646ddd7f2fc01ba4e1b3d68a5420400fd5b75b8 (patch)
tree98ce8ef0f848acd78dcd065e2e97271ddeb70d84
parent82f734b9a3d7a4c959a22d5abe77fb834a431723 (diff)
downloadservo-3646ddd7f2fc01ba4e1b3d68a5420400fd5b75b8.tar.gz
servo-3646ddd7f2fc01ba4e1b3d68a5420400fd5b75b8.zip
Send logging messages even if the channel lock is poisoned.
-rw-r--r--components/constellation/constellation.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index d2f045de0d1..2017f0b4b09 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -342,9 +342,8 @@ impl Log for FromScriptLogger {
let pipeline_id = PipelineId::installed();
let thread_name = thread::current().name().map(ToOwned::to_owned);
let msg = FromScriptMsg::LogEntry(pipeline_id, thread_name, entry);
- if let Ok(chan) = self.constellation_chan.lock() {
- let _ = chan.send(msg);
- }
+ let chan = self.constellation_chan.lock().unwrap_or_else(|err| err.into_inner());
+ let _ = chan.send(msg);
}
}
}
@@ -381,9 +380,8 @@ impl Log for FromCompositorLogger {
let pipeline_id = PipelineId::installed();
let thread_name = thread::current().name().map(ToOwned::to_owned);
let msg = FromCompositorMsg::LogEntry(pipeline_id, thread_name, entry);
- if let Ok(chan) = self.constellation_chan.lock() {
- let _ = chan.send(msg);
- }
+ let chan = self.constellation_chan.lock().unwrap_or_else(|err| err.into_inner());
+ let _ = chan.send(msg);
}
}
}