mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Implement cancellation listener for cancelling network requests
This commit is contained in:
parent
92f9e58310
commit
10f5584f78
11 changed files with 191 additions and 53 deletions
|
@ -280,7 +280,7 @@ impl XMLHttpRequest {
|
|||
ROUTER.add_route(action_receiver.to_opaque(), box move |message| {
|
||||
listener.notify(message.to().unwrap());
|
||||
});
|
||||
resource_task.send(Load(load_data, LoadConsumer::Listener(response_target))).unwrap();
|
||||
resource_task.send(Load(load_data, LoadConsumer::Listener(response_target), None)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1965,7 +1965,7 @@ impl ScriptTask {
|
|||
data: load_data.data,
|
||||
cors: None,
|
||||
pipeline_id: Some(id),
|
||||
}, LoadConsumer::Listener(response_target))).unwrap();
|
||||
}, LoadConsumer::Listener(response_target), None)).unwrap();
|
||||
|
||||
self.incomplete_loads.borrow_mut().push(incomplete);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue