mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Send logging messages even if the channel lock is poisoned.
This commit is contained in:
parent
82f734b9a3
commit
3646ddd7f2
1 changed files with 4 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue