mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
servo: Merge #11749 - Check to see if about:failure failed (from asajeffrey:constellation-failing-failure); r=glennw
<!-- 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. --> Source-Repo: https://github.com/servo/servo Source-Revision: 033786cd0dd0f74b5e2974aa67e000b832f17d17
This commit is contained in:
parent
22828e691d
commit
ac32626ae1
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user