mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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.
This commit is contained in:
parent
bb8166bb97
commit
7596c36959
5 changed files with 16 additions and 9 deletions
|
@ -36,6 +36,7 @@ use net_traits::{
|
|||
FetchTaskTarget, IncludeSubdomains, NetworkError, ReferrerPolicy, ResourceFetchTiming,
|
||||
ResourceTimingType,
|
||||
};
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
@ -665,7 +666,7 @@ fn test_fetch_with_hsts() {
|
|||
devtools_chan: None,
|
||||
filemanager: FileManager::new(create_embedder_proxy()),
|
||||
cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(None))),
|
||||
timing: Arc::new(Mutex::new(ResourceFetchTiming::new(
|
||||
timing: ServoArc::new(Mutex::new(ResourceFetchTiming::new(
|
||||
ResourceTimingType::Navigation,
|
||||
))),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue