diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-15 07:19:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 07:19:08 -0500 |
commit | 033786cd0dd0f74b5e2974aa67e000b832f17d17 (patch) | |
tree | 4c2ad24fb96efa6ea54461c21c61c59426140e7b | |
parent | 2086d216ddf2cf87f44dd2da44281daaf810e0a0 (diff) | |
parent | 5109ece29a81b6e32e66bccd99997bb4da13387c (diff) | |
download | servo-033786cd0dd0f74b5e2974aa67e000b832f17d17.tar.gz servo-033786cd0dd0f74b5e2974aa67e000b832f17d17.zip |
Auto merge of #11749 - asajeffrey:constellation-failing-failure, r=glennw
Check to see if about:failure failed.
<!-- Please describe your changes on the following line: -->
Check to see if about:failure is failing,
---
<!-- 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 #11747
- [X] These changes do not require tests because we're not testing panic recovery
<!-- 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/11749)
<!-- Reviewable:end -->
-rw-r--r-- | components/constellation/constellation.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index cdf66a006fb..c726d546e0d 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -907,6 +907,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF> debug!("Panic handler for pipeline {:?}: {}.", pipeline_id, reason); if let Some(pipeline_id) = pipeline_id { + let pipeline_url = self.pipelines.get(&pipeline_id).map(|pipeline| pipeline.url.clone()); let parent_info = self.pipelines.get(&pipeline_id).and_then(|pipeline| pipeline.parent_info); let window_size = self.pipelines.get(&pipeline_id).and_then(|pipeline| pipeline.size); @@ -923,14 +924,19 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF> self.close_pipeline(pending_pipeline_id, ExitPipelineMode::Force); } + let failure_url = Url::parse("about:failure").expect("infallible"); + + if let Some(pipeline_url) = pipeline_url { + if pipeline_url == failure_url { + return error!("about:failure failed"); + } + } + warn!("creating replacement pipeline for about:failure"); let new_pipeline_id = PipelineId::new(); - self.new_pipeline(new_pipeline_id, - parent_info, - window_size, - None, - LoadData::new(Url::parse("about:failure").expect("infallible"), None, None)); + let load_data = LoadData::new(failure_url, None, None); + self.new_pipeline(new_pipeline_id, parent_info, window_size, None, load_data); self.push_pending_frame(new_pipeline_id, Some(pipeline_id)); |