Auto merge of #14138 - servo:fetch-context, r=KiChjang

Pass a borrowed fetch context to 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/14138)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-08 23:40:38 -06:00 committed by GitHub
commit 9d1c1f434d
4 changed files with 8 additions and 8 deletions

View file

@ -63,7 +63,7 @@ type DoneChannel = Option<(Sender<Data>, Receiver<Data>)>;
/// [Fetch](https://fetch.spec.whatwg.org#concept-fetch)
pub fn fetch<UI: 'static + UIProvider>(request: Rc<Request>,
target: &mut Target,
context: FetchContext<UI>)
context: &FetchContext<UI>)
-> Response {
fetch_with_cors_cache(request, &mut CORSCache::new(), target, context)
}
@ -71,7 +71,7 @@ pub fn fetch<UI: 'static + UIProvider>(request: Rc<Request>,
pub fn fetch_with_cors_cache<UI: 'static + UIProvider>(request: Rc<Request>,
cache: &mut CORSCache,
target: &mut Target,
context: FetchContext<UI>)
context: &FetchContext<UI>)
-> Response {
// Step 1
if request.window.get() == Window::Client {

View file

@ -586,7 +586,7 @@ impl CoreResourceManager {
devtools_chan: dc,
filemanager: filemanager,
};
fetch(Rc::new(request), &mut target, context);
fetch(Rc::new(request), &mut target, &context);
})
}