mirror of
https://github.com/servo/servo.git
synced 2025-07-29 10:10:34 +01:00
Auto merge of #11585 - asajeffrey:constellation-avoid-deadlock-during-pipeline-closure, r=larsbergstrom
Avoid deadlock when closing a pipeline. <!-- Please describe your changes on the following line: --> At the moment, the constellation blocks on a pipeline during closure. This PR makes pipeline closure asynchronous. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11546. - [X] These changes do not require tests because testing for absence of deadlock is difficult. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11585) <!-- Reviewable:end -->
This commit is contained in:
commit
6581e3504a
7 changed files with 92 additions and 26 deletions
|
@ -1407,6 +1407,7 @@ impl ScriptThread {
|
|||
if window.pipeline() == id {
|
||||
debug!("shutting down layout for root context {:?}", id);
|
||||
shut_down_layout(&context);
|
||||
let _ = self.constellation_chan.send(ConstellationMsg::PipelineExited(id));
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -1414,6 +1415,7 @@ impl ScriptThread {
|
|||
if let Some(ref mut child_context) = context.remove(id) {
|
||||
shut_down_layout(&child_context);
|
||||
}
|
||||
let _ = self.constellation_chan.send(ConstellationMsg::PipelineExited(id));
|
||||
false
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue