aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch/methods.rs
diff options
context:
space:
mode:
authorJaved Nissar <javed.nissar@mail.utoronto.ca>2019-09-17 18:01:40 -0400
committerJaved Nissar <javed.nissar@mail.utoronto.ca>2019-09-18 11:54:28 -0400
commit7596c36959c512f09190d5a3d412b624dcd37b73 (patch)
treeb65bdf5057ef4ecc2e3c8e9e8035635ca28816f4 /components/net/fetch/methods.rs
parentbb8166bb978cca01e06125490f8367b684776cef (diff)
downloadservo-7596c36959c512f09190d5a3d412b624dcd37b73.tar.gz
servo-7596c36959c512f09190d5a3d412b624dcd37b73.zip
Move ResourceFetchTiming into Arc
The purpose of this commit is to ensure that the Response object has access to Timing updates as previously the Response object simply stored a ResourceFetchTiming struct so updates on ResourceFetchTiming that were not explicitly done on the Response would not be passed down. The references to ServoArc are added because Response uses servo_arc::Arc rather than std::sync::Arc as is used elsewhere. So, we've switched those other places to servo_arc::Arc instead of switching Response to std::sync::Arc.
Diffstat (limited to 'components/net/fetch/methods.rs')
-rw-r--r--components/net/fetch/methods.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs
index eadc3ea0597..503e93d3687 100644
--- a/components/net/fetch/methods.rs
+++ b/components/net/fetch/methods.rs
@@ -23,6 +23,7 @@ use net_traits::request::{Origin, ResponseTainting, Window};
use net_traits::response::{Response, ResponseBody, ResponseType};
use net_traits::ResourceAttribute;
use net_traits::{FetchTaskTarget, NetworkError, ReferrerPolicy, ResourceFetchTiming};
+use servo_arc::Arc as ServoArc;
use servo_url::ServoUrl;
use std::borrow::Cow;
use std::fs::File;
@@ -52,7 +53,7 @@ pub struct FetchContext {
pub devtools_chan: Option<Sender<DevtoolsControlMsg>>,
pub filemanager: FileManager,
pub cancellation_listener: Arc<Mutex<CancellationListener>>,
- pub timing: Arc<Mutex<ResourceFetchTiming>>,
+ pub timing: ServoArc<Mutex<ResourceFetchTiming>>,
}
pub struct CancellationListener {