mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Some failed requests should record resource timing entries (#41804)
Some failed requests should record resource timing entries Testing: ./mach test-wpt tests/wpt/tests/resource-timing/entries-for-network-errors.sub.https.html Fixes: https://github.com/servo/servo/issues/41667 --------- Signed-off-by: bellau <laurent.belmonte@gmail.com>
This commit is contained in:
@@ -307,15 +307,14 @@ impl FetchResponseListener for ImageContext {
|
||||
fn process_response_eof(
|
||||
self,
|
||||
request_id: RequestId,
|
||||
response: Result<ResourceFetchTiming, NetworkError>,
|
||||
response: Result<(), NetworkError>,
|
||||
timing: ResourceFetchTiming,
|
||||
) {
|
||||
self.image_cache.notify_pending_response(
|
||||
self.id,
|
||||
FetchResponseMsg::ProcessResponseEOF(request_id, response.clone()),
|
||||
FetchResponseMsg::ProcessResponseEOF(request_id, response.clone(), timing.clone()),
|
||||
);
|
||||
if let Ok(response) = response {
|
||||
network_listener::submit_timing(&self, &response, CanGc::note());
|
||||
}
|
||||
network_listener::submit_timing(&self, &response, &timing, CanGc::note());
|
||||
}
|
||||
|
||||
fn process_csp_violations(&mut self, _request_id: RequestId, violations: Vec<Violation>) {
|
||||
|
||||
Reference in New Issue
Block a user