diff options
author | Javed Nissar <javed.nissar@mail.utoronto.ca> | 2019-09-17 18:01:40 -0400 |
---|---|---|
committer | Javed Nissar <javed.nissar@mail.utoronto.ca> | 2019-09-18 11:54:28 -0400 |
commit | 7596c36959c512f09190d5a3d412b624dcd37b73 (patch) | |
tree | b65bdf5057ef4ecc2e3c8e9e8035635ca28816f4 /components/net/resource_thread.rs | |
parent | bb8166bb978cca01e06125490f8367b684776cef (diff) | |
download | servo-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/resource_thread.rs')
-rw-r--r-- | components/net/resource_thread.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/net/resource_thread.rs b/components/net/resource_thread.rs index 6b7ac04b891..33f878f1207 100644 --- a/components/net/resource_thread.rs +++ b/components/net/resource_thread.rs @@ -36,6 +36,7 @@ use profile_traits::mem::ProfilerChan as MemProfilerChan; use profile_traits::mem::{Report, ReportKind, ReportsChan}; use profile_traits::time::ProfilerChan; use serde::{Deserialize, Serialize}; +use servo_arc::Arc as ServoArc; use servo_url::ServoUrl; use std::borrow::{Cow, ToOwned}; use std::collections::HashMap; @@ -491,7 +492,7 @@ impl CoreResourceManager { devtools_chan: dc, filemanager: filemanager, cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(cancel_chan))), - timing: Arc::new(Mutex::new(ResourceFetchTiming::new(request.timing_type()))), + timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new(request.timing_type()))), }; match res_init_ { |