mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add a FileManager to FetchContext.
This commit is contained in:
parent
d820387758
commit
fc68e0a6ca
4 changed files with 66 additions and 38 deletions
|
@ -592,6 +592,7 @@ impl CoreResourceManager {
|
|||
};
|
||||
let ua = self.user_agent.clone();
|
||||
let dc = self.devtools_chan.clone();
|
||||
let filemanager = self.filemanager.clone();
|
||||
spawn_named(format!("fetch thread for {}", init.url), move || {
|
||||
let request = Request::from_init(init);
|
||||
// XXXManishearth: Check origin against pipeline id (also ensure that the mode is allowed)
|
||||
|
@ -599,7 +600,12 @@ impl CoreResourceManager {
|
|||
// todo referrer policy?
|
||||
// todo service worker stuff
|
||||
let mut target = Some(Box::new(sender) as Box<FetchTaskTarget + Send + 'static>);
|
||||
let context = FetchContext { state: http_state, user_agent: ua, devtools_chan: dc };
|
||||
let context = FetchContext {
|
||||
state: http_state,
|
||||
user_agent: ua,
|
||||
devtools_chan: dc,
|
||||
filemanager: filemanager,
|
||||
};
|
||||
fetch(Rc::new(request), &mut target, context);
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue