diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 800c383b16e..6bfa6c992e4 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -576,9 +576,9 @@ impl IOCompositor { self.change_page_url(pipeline_id, url); } - (Msg::SetFrameTree(frame_tree, response_chan, new_constellation_chan), + (Msg::SetFrameTree(frame_tree, response_chan), ShutdownState::NotShuttingDown) => { - self.set_frame_tree(&frame_tree, response_chan, new_constellation_chan); + self.set_frame_tree(&frame_tree, response_chan); self.send_viewport_rects_for_all_layers(); self.title_for_main_frame(); } @@ -846,8 +846,7 @@ impl IOCompositor { fn set_frame_tree(&mut self, frame_tree: &SendableFrameTree, - response_chan: IpcSender<()>, - new_constellation_chan: Sender) { + response_chan: IpcSender<()>) { if let Err(e) = response_chan.send(()) { warn!("Sending reponse to set frame tree failed ({}).", e); } @@ -874,8 +873,6 @@ impl IOCompositor { self.create_pipeline_details_for_frame_tree(&frame_tree); - // Initialize the new constellation channel by sending it the root window size. - self.constellation_chan = new_constellation_chan; self.send_window_size(WindowSizeType::Initial); self.frame_tree_id.next(); diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index 910e6817d76..325cdc3d104 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -141,7 +141,7 @@ pub enum Msg { /// Alerts the compositor that the given pipeline has changed whether it is running animations. ChangeRunningAnimationsState(PipelineId, AnimationState), /// Replaces the current frame tree, typically called during main frame navigation. - SetFrameTree(SendableFrameTree, IpcSender<()>, Sender), + SetFrameTree(SendableFrameTree, IpcSender<()>), /// The load of a page has begun: (can go back, can go forward). LoadStart(bool, bool), /// The load of a page has completed: (can go back, can go forward, is root frame). diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 4137d9290bf..aea7092b0df 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -85,9 +85,6 @@ pub struct Constellation { /// A channel through which script messages can be sent to this object. script_sender: IpcSender, - /// A channel through which compositor messages can be sent to this object. - compositor_sender: Sender, - /// A channel through which layout thread messages can be sent to this object. layout_sender: IpcSender, @@ -321,12 +318,10 @@ impl Constellation let panic_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_panic_receiver); let (compositor_sender, compositor_receiver) = channel(); - let compositor_sender_clone = compositor_sender.clone(); spawn_named("Constellation".to_owned(), move || { let mut constellation: Constellation = Constellation { script_sender: ipc_script_sender, - compositor_sender: compositor_sender_clone, layout_sender: ipc_layout_sender, script_receiver: script_receiver, panic_sender: ipc_panic_sender, @@ -2032,8 +2027,7 @@ impl Constellation if let Some(frame_tree) = self.frame_to_sendable(root_frame_id) { let (chan, port) = ipc::channel().expect("Failed to create IPC channel!"); self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree, - chan, - self.compositor_sender.clone())); + chan)); if port.recv().is_err() { warn!("Compositor has discarded SetFrameTree"); return; // Our message has been discarded, probably shutting down.