Address review comments

This commit is contained in:
Glenn Watson 2015-05-20 07:10:55 +10:00
parent 35a570ab66
commit decfb0da6e

View file

@ -1086,7 +1086,6 @@ impl ScriptTask {
}); });
if let Some(idx) = idx { if let Some(idx) = idx {
// TODO(gw): This probably leaks resources!
let load = self.incomplete_loads.borrow_mut().remove(idx); let load = self.incomplete_loads.borrow_mut().remove(idx);
// Tell the layout task to begin shutting down, and wait until it // Tell the layout task to begin shutting down, and wait until it
@ -1094,7 +1093,7 @@ impl ScriptTask {
let (response_chan, response_port) = channel(); let (response_chan, response_port) = channel();
let LayoutChan(chan) = load.layout_chan; let LayoutChan(chan) = load.layout_chan;
if chan.send(layout_interface::Msg::PrepareToExit(response_chan)).is_ok() { if chan.send(layout_interface::Msg::PrepareToExit(response_chan)).is_ok() {
debug!("shutting down layout for root page {:?}", id); debug!("shutting down layout for page {:?}", id);
response_port.recv().unwrap(); response_port.recv().unwrap();
chan.send(layout_interface::Msg::ExitNow(exit_type)).ok(); chan.send(layout_interface::Msg::ExitNow(exit_type)).ok();
} }