mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Extract layout image request into separate file. Do not block the document load event.
This commit is contained in:
parent
0d2ec852ac
commit
b363371339
4 changed files with 92 additions and 72 deletions
|
@ -116,6 +116,13 @@ impl DocumentLoader {
|
|||
request: RequestInit,
|
||||
fetch_target: IpcSender<FetchResponseMsg>) {
|
||||
self.add_blocking_load(load);
|
||||
self.fetch_async_background(request, fetch_target);
|
||||
}
|
||||
|
||||
/// Initiate a new fetch that does not block the document load event.
|
||||
pub fn fetch_async_background(&mut self,
|
||||
request: RequestInit,
|
||||
fetch_target: IpcSender<FetchResponseMsg>) {
|
||||
self.resource_threads.sender().send(CoreResourceMsg::Fetch(request, fetch_target)).unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue