mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use FetchCanceller for document loads
This commit is contained in:
parent
78c8b4232f
commit
3900f5e616
11 changed files with 51 additions and 24 deletions
|
@ -1110,9 +1110,9 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
FromScriptMsg::PipelineExited => {
|
||||
self.handle_pipeline_exited(source_pipeline_id);
|
||||
}
|
||||
FromScriptMsg::InitiateNavigateRequest(req_init) => {
|
||||
FromScriptMsg::InitiateNavigateRequest(req_init, cancel_chan) => {
|
||||
debug!("constellation got initiate navigate request message");
|
||||
self.handle_navigate_request(source_pipeline_id, req_init);
|
||||
self.handle_navigate_request(source_pipeline_id, req_init, cancel_chan);
|
||||
}
|
||||
FromScriptMsg::ScriptLoadedURLInIFrame(load_info) => {
|
||||
debug!("constellation got iframe URL load message {:?} {:?} {:?}",
|
||||
|
@ -1689,14 +1689,15 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
|
||||
fn handle_navigate_request(&self,
|
||||
id: PipelineId,
|
||||
req_init: RequestInit) {
|
||||
req_init: RequestInit,
|
||||
cancel_chan: IpcReceiver<()>) {
|
||||
let listener = NetworkListener::new(
|
||||
req_init,
|
||||
id,
|
||||
self.public_resource_threads.clone(),
|
||||
self.network_listener_sender.clone());
|
||||
|
||||
listener.initiate_fetch();
|
||||
listener.initiate_fetch(Some(cancel_chan));
|
||||
}
|
||||
|
||||
// The script thread associated with pipeline_id has loaded a URL in an iframe via script. This
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue