mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #22808 - servo:jdm-patch-10, r=asajeffrey
Avoid locking network timing data unnecessarily. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22808) <!-- Reviewable:end -->
This commit is contained in:
commit
008368fa67
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