mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Shared Sniffer Task
- Added TargetedLoadResponse and ResponseSenders - LoadData constructor contains the next consumer which means SnifferManager doesn't need the next consumer to start - New SnifferTask is created at new resource_task creation - Update Unit Tests
This commit is contained in:
parent
82050d1e53
commit
f5e9ae17cf
9 changed files with 134 additions and 79 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue