mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
handle case of deleted pipeline when preparing to send load_end constellation msg
This commit is contained in:
parent
45116dca71
commit
fcf449517d
1 changed files with 7 additions and 4 deletions
|
@ -666,8 +666,8 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_load_start_msg(&mut self, pipeline_id: &PipelineId) {
|
fn handle_load_start_msg(&mut self, pipeline_id: &PipelineId) {
|
||||||
let mut back = false;
|
let mut back;
|
||||||
let mut forward = false;
|
let mut forward;
|
||||||
let frameid = self.pipeline_to_frame_map.get(pipeline_id);
|
let frameid = self.pipeline_to_frame_map.get(pipeline_id);
|
||||||
match frameid {
|
match frameid {
|
||||||
Some(frame_id) => {
|
Some(frame_id) => {
|
||||||
|
@ -676,13 +676,16 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
||||||
back = if !self.frame(*frame_id).prev.is_empty() { true }
|
back = if !self.frame(*frame_id).prev.is_empty() { true }
|
||||||
else { false };
|
else { false };
|
||||||
},
|
},
|
||||||
None => {}
|
None => return
|
||||||
};
|
};
|
||||||
self.compositor_proxy.send(CompositorMsg::LoadStart(back, forward));
|
self.compositor_proxy.send(CompositorMsg::LoadStart(back, forward));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_load_complete_msg(&mut self, pipeline_id: &PipelineId) {
|
fn handle_load_complete_msg(&mut self, pipeline_id: &PipelineId) {
|
||||||
let frame_id = *self.pipeline_to_frame_map.get(pipeline_id).unwrap();
|
let frame_id = match self.pipeline_to_frame_map.get(pipeline_id) {
|
||||||
|
Some(frame) => *frame,
|
||||||
|
None => return
|
||||||
|
};
|
||||||
|
|
||||||
let forward = !self.mut_frame(frame_id).next.is_empty();
|
let forward = !self.mut_frame(frame_id).next.is_empty();
|
||||||
let back = !self.mut_frame(frame_id).prev.is_empty();
|
let back = !self.mut_frame(frame_id).prev.is_empty();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue