mirror of
https://github.com/servo/servo.git
synced 2025-08-01 11:40:30 +01:00
Auto merge of #10898 - asajeffrey:chaotic-even-better, r=Manishearth
In chaos-monkey mode, only keep the mozbrowser pipeline alive. Fixes #10897 <!-- 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/10898) <!-- Reviewable:end -->
This commit is contained in:
commit
693478bc91
1 changed files with 11 additions and 6 deletions
|
@ -1935,12 +1935,17 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
|
|||
if let Some((ref mut rng, _)) = self.random_pipeline_closure {
|
||||
if let Some(pipeline_id) = rng.choose(&*pipeline_ids) {
|
||||
if let Some(pipeline) = self.pipelines.get(pipeline_id) {
|
||||
// Don't kill the root pipeline
|
||||
if pipeline.parent_info.is_none() { return; }
|
||||
// Note that we deliberately do not do any of the tidying up
|
||||
// associated with closing a pipeline. The constellation should cope!
|
||||
info!("Randomly closing pipeline {}.", pipeline_id);
|
||||
pipeline.force_exit();
|
||||
// Don't kill the mozbrowser pipeline
|
||||
if prefs::get_pref("dom.mozbrowser.enabled").as_boolean().unwrap_or(false) &&
|
||||
pipeline.parent_info.is_none()
|
||||
{
|
||||
info!("Not closing mozbrowser pipeline {}.", pipeline_id);
|
||||
} else {
|
||||
// Note that we deliberately do not do any of the tidying up
|
||||
// associated with closing a pipeline. The constellation should cope!
|
||||
info!("Randomly closing pipeline {}.", pipeline_id);
|
||||
pipeline.force_exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue