mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Remove unused boolean argument from ContellationMsg's GetPipeline
This commit is contained in:
parent
cb5ceec150
commit
95552c4019
3 changed files with 5 additions and 5 deletions
|
@ -1920,15 +1920,15 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
}
|
||||
|
||||
fn handle_get_pipeline(&mut self, frame_id: Option<FrameId>,
|
||||
resp_chan: IpcSender<Option<(PipelineId, bool)>>) {
|
||||
resp_chan: IpcSender<Option<PipelineId>>) {
|
||||
let frame_id = frame_id.unwrap_or(self.root_frame_id);
|
||||
let current_pipeline_id = self.frames.get(&frame_id)
|
||||
.map(|frame| frame.current.pipeline_id);
|
||||
let current_pipeline_id_loaded = current_pipeline_id
|
||||
.map(|id| (id, true));
|
||||
.map(|id| id);
|
||||
let pipeline_id_loaded = self.pending_frames.iter().rev()
|
||||
.find(|x| x.old_pipeline_id == current_pipeline_id)
|
||||
.map(|x| (x.new_pipeline_id, false))
|
||||
.map(|x| x.new_pipeline_id)
|
||||
.or(current_pipeline_id_loaded);
|
||||
if let Err(e) = resp_chan.send(pipeline_id_loaded) {
|
||||
warn!("Failed get_pipeline response ({}).", e);
|
||||
|
|
|
@ -686,7 +686,7 @@ pub enum ConstellationMsg {
|
|||
/// Request that the constellation send the current pipeline id for the provided frame
|
||||
/// id, or for the root frame if this is None, over a provided channel.
|
||||
/// Also returns a boolean saying whether the document has finished loading or not.
|
||||
GetPipeline(Option<FrameId>, IpcSender<Option<(PipelineId, bool)>>),
|
||||
GetPipeline(Option<FrameId>, IpcSender<Option<PipelineId>>),
|
||||
/// Requests that the constellation inform the compositor of the title of the pipeline
|
||||
/// immediately.
|
||||
GetPipelineTitle(PipelineId),
|
||||
|
|
|
@ -260,7 +260,7 @@ impl Handler {
|
|||
let msg = ConstellationMsg::GetPipeline(frame_id, sender.clone());
|
||||
self.constellation_chan.send(msg).unwrap();
|
||||
// Wait until the document is ready before returning the pipeline id.
|
||||
if let Some((x, true)) = receiver.recv().unwrap() {
|
||||
if let Some(x) = receiver.recv().unwrap() {
|
||||
return Ok(x);
|
||||
}
|
||||
thread::sleep(Duration::from_millis(interval));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue