mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
script: Don't hold the stderr lock while doing sync operations with the constellation.
Otherwise if you enable debug logging, you deadlock.
This commit is contained in:
parent
e6958d3947
commit
702445a3ec
1 changed files with 9 additions and 7 deletions
|
@ -450,13 +450,15 @@ impl WindowMethods for Window {
|
|||
// Right now, just print to the console
|
||||
// Ensure that stderr doesn't trample through the alert() we use to
|
||||
// communicate test results (see executorservo.py in wptrunner).
|
||||
let stderr = stderr();
|
||||
let mut stderr = stderr.lock();
|
||||
let stdout = stdout();
|
||||
let mut stdout = stdout.lock();
|
||||
writeln!(&mut stdout, "ALERT: {}", s).unwrap();
|
||||
stdout.flush().unwrap();
|
||||
stderr.flush().unwrap();
|
||||
{
|
||||
let stderr = stderr();
|
||||
let mut stderr = stderr.lock();
|
||||
let stdout = stdout();
|
||||
let mut stdout = stdout.lock();
|
||||
writeln!(&mut stdout, "ALERT: {}", s).unwrap();
|
||||
stdout.flush().unwrap();
|
||||
stderr.flush().unwrap();
|
||||
}
|
||||
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
self.constellation_chan().send(ConstellationMsg::Alert(self.pipeline(), s.to_string(), sender)).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue