mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #19274 - Manishearth:xhr-cancel, r=jdm
Fetch cancellation This PR implements cancellation for fetch, and uses it for XHR. This means that fetch clients can now send a message to the fetch task asking for the network request to be aborted. Previously, clients like XHR had abort functionality but would implement it by simply ignoring future messages from the network task; and would not actually cancel the network fetch. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19274) <!-- Reviewable:end -->
This commit is contained in:
commit
00b3612fe9
12 changed files with 98 additions and 31 deletions
|
@ -109,7 +109,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