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 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_ {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue