mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fetch cancellation: Add cancel_chan to FetchContext
This commit is contained in:
parent
b5a205d92e
commit
1dfb125cc9
10 changed files with 22 additions and 16 deletions
|
@ -126,7 +126,7 @@ impl DocumentLoader {
|
|||
request: RequestInit,
|
||||
fetch_target: IpcSender<FetchResponseMsg>) {
|
||||
self.resource_threads.sender().send(
|
||||
CoreResourceMsg::Fetch(request, FetchChannels::ResponseMsg(fetch_target))).unwrap();
|
||||
CoreResourceMsg::Fetch(request, FetchChannels::ResponseMsg(fetch_target, None))).unwrap();
|
||||
}
|
||||
|
||||
/// Mark an in-progress network request complete.
|
||||
|
|
|
@ -491,7 +491,7 @@ impl EventSource {
|
|||
listener.notify_fetch(message.to().unwrap());
|
||||
}));
|
||||
global.core_resource_thread().send(
|
||||
CoreResourceMsg::Fetch(request, FetchChannels::ResponseMsg(action_sender))).unwrap();
|
||||
CoreResourceMsg::Fetch(request, FetchChannels::ResponseMsg(action_sender, None))).unwrap();
|
||||
// Step 13
|
||||
Ok(ev)
|
||||
}
|
||||
|
@ -555,6 +555,6 @@ impl EventSourceTimeoutCallback {
|
|||
}
|
||||
// Step 5.4
|
||||
global.core_resource_thread().send(
|
||||
CoreResourceMsg::Fetch(request, FetchChannels::ResponseMsg(self.action_sender))).unwrap();
|
||||
CoreResourceMsg::Fetch(request, FetchChannels::ResponseMsg(self.action_sender, None))).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ impl XMLHttpRequest {
|
|||
listener.notify_fetch(message.to().unwrap());
|
||||
}));
|
||||
global.core_resource_thread().send(
|
||||
Fetch(init, FetchChannels::ResponseMsg(action_sender))).unwrap();
|
||||
Fetch(init, FetchChannels::ResponseMsg(action_sender, None))).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ pub fn Fetch(global: &GlobalScope, input: RequestInfo, init: RootedTraceableBox<
|
|||
listener.notify_fetch(message.to().unwrap());
|
||||
}));
|
||||
core_resource_thread.send(
|
||||
NetTraitsFetch(request_init, FetchChannels::ResponseMsg(action_sender))).unwrap();
|
||||
NetTraitsFetch(request_init, FetchChannels::ResponseMsg(action_sender, None))).unwrap();
|
||||
|
||||
promise
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue