aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch/methods.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-11-08 18:01:23 +0100
committerMs2ger <Ms2ger@gmail.com>2016-11-08 18:01:23 +0100
commit234b47e33e31bda41c39725265061a6cf2cd7048 (patch)
treef9b21b35f8c104d3a54c500c9db47c6cced1339b /components/net/fetch/methods.rs
parent1153ca9841f458daf373471f3c65295abd872271 (diff)
downloadservo-234b47e33e31bda41c39725265061a6cf2cd7048.tar.gz
servo-234b47e33e31bda41c39725265061a6cf2cd7048.zip
Pass a borrowed fetch context to fetch().
This will allow inspecting its state after fetching in unit tests.
Diffstat (limited to 'components/net/fetch/methods.rs')
-rw-r--r--components/net/fetch/methods.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs
index 092a5e7f0ef..eba6481f236 100644
--- a/components/net/fetch/methods.rs
+++ b/components/net/fetch/methods.rs
@@ -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 {