servo: Merge #4000 - M1456: Shared SnifferTask (from t29:mime-sniffing); r=jdm

Issue: #3144

This PR addresses the second step of the ticket. i.e. move from a 1:1 sniffer:request task model to a shared sniffer task.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1ac79c64da4b14f83fed6ca123a81417b9c0fc87
This commit is contained in:
Kshitij Parajuli
2014-11-28 10:51:44 -07:00
parent 86cdf0a68f
commit 4e20eea707
9 changed files with 134 additions and 79 deletions

View File

@@ -200,13 +200,13 @@ pub fn parse_html(page: &Page,
InputUrl(ref url) => {
// Wait for the LoadResponse so that the parser knows the final URL.
let (input_chan, input_port) = channel();
let mut load_data = LoadData::new(url.clone());
let mut load_data = LoadData::new(url.clone(), input_chan);
msg_load_data.map(|m| {
load_data.headers = m.headers;
load_data.method = m.method;
load_data.data = m.data;
});
resource_task.send(Load(load_data, input_chan));
resource_task.send(Load(load_data));
let load_response = input_port.recv();