Remove unnecessary recv in the constellation

This commit is contained in:
Connor Brewster 2017-06-23 17:42:18 -06:00
parent 3e4021ef1a
commit a92ba8784b
3 changed files with 6 additions and 17 deletions

View file

@ -2870,13 +2870,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
// with low-resource scenarios.
debug!("Sending frame tree for browsing context {}.", browsing_context_id);
if let Some(frame_tree) = self.browsing_context_to_sendable(browsing_context_id) {
let (chan, port) = ipc::channel().expect("Failed to create IPC channel!");
self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree,
chan));
if port.recv().is_err() {
warn!("Compositor has discarded SetFrameTree");
return; // Our message has been discarded, probably shutting down.
}
self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree));
}
}