Skip to content

Commit

Permalink
[Lantern] Ignore document requests that failed
Browse files Browse the repository at this point in the history
Github issue:
GoogleChrome/lighthouse#16289

Bug: None
Change-Id: I5cc4743de112c8b6fe2bec9d1a094ce331ca8cf8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6112617
Reviewed-by: Connor Clark <[email protected]>
Commit-Queue: Adam Raine <[email protected]>
  • Loading branch information
Adam Raine authored and Devtools-frontend LUCI CQ committed Jan 6, 2025
1 parent 585254f commit 361959b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front_end/models/trace/lantern/core/NetworkAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ class NetworkAnalyzer {
static findLastDocumentForUrl<T extends Lantern.NetworkRequest>(records: Array<T>, resourceUrl: string): T|undefined {
// equalWithExcludedFragments is expensive, so check that the resourceUrl starts with the request url first
const matchingRequests = records.filter(
request => request.resourceType === 'Document' &&
request => request.resourceType === 'Document' && !request.failed &&
// Note: `request.url` should never have a fragment, else this optimization gives wrong results.
resourceUrl.startsWith(request.url) && UrlUtils.equalWithExcludedFragments(request.url, resourceUrl),
);
Expand Down

0 comments on commit 361959b

Please sign in to comment.