Bug 188287

Summary: Web Inspector: [Backend] Page.searchInResources sometimes returns duplicate results for a resource
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Description Joseph Pecoraro 2018-08-02 16:55:21 PDT
Web Inspector: [Backend] Page.searchInResources sometimes returns duplicate results for a resource

Steps to Reproduce:
1. Inspect <https://www.cio.com>
2. Search for "touchMoved:"
3. May require a reload + research to trigger this issue
  => Page.searchInResources result sometimes includes select2.js multiple times

Logs:

    [Log] request: {"id":795,"method":"Page.searchInResource","params":{"frameId":"0.4","url":"https://www.cio.com/www.idge.ans/js/select2-3.5.0/select2.js","query":"touchMoved:","caseSensitive":false,"isRegex":false}} (Main.js, line 941)
    [Log] request: {"id":796,"method":"Page.searchInResource","params":{"frameId":"0.4","url":"https://www.cio.com/www.idge.ans/js/select2-3.5.0/select2.js","query":"touchMoved:","caseSensitive":false,"isRegex":false,"requestId":"0.972"}} (Main.js, line 941)

Notes:

  • PageAgent::searchInResources searches cached resources
  • NetworkAgent::searchOtherRequests searches NetworkData data, such as XHRs and Worker scripts

See also:

  Frontend workaround for this:
  <https://webkit.org/b/188270> Web Inspector: Global search sometimes returns duplicate results for a resource

Apparently we are hitting the same resource multiple times. How can the backend avoid this duplicated work?
Comment 1 Radar WebKit Bug Importer 2018-08-02 16:55:42 PDT
<rdar://problem/42879586>
Comment 2 Frances Cornwall 2024-05-06 10:54:06 PDT
Pull request: https://github.com/WebKit/WebKit/pull/28182