mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Avoid locking network timing data unnecessarily.
This commit is contained in:
parent
4a6b911908
commit
086d2f4c26
1 changed files with 3 additions and 4 deletions
|
@ -618,8 +618,7 @@ pub fn http_fetch(
|
|||
request.redirect_count as u16,
|
||||
));
|
||||
|
||||
let timing = &*context.timing.lock().unwrap();
|
||||
response.resource_timing = timing.clone();
|
||||
response.resource_timing = context.timing.lock().unwrap().clone();
|
||||
|
||||
// Step 6
|
||||
response
|
||||
|
@ -1207,8 +1206,8 @@ fn http_network_fetch(
|
|||
}
|
||||
}
|
||||
|
||||
let timing = &*context.timing.lock().unwrap();
|
||||
let mut response = Response::new(url.clone(), timing.clone());
|
||||
let timing = context.timing.lock().unwrap().clone();
|
||||
let mut response = Response::new(url.clone(), timing);
|
||||
response.status = Some((
|
||||
res.status(),
|
||||
res.status().canonical_reason().unwrap_or("").into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue