* SUMMARY XHRs and Web Worker scripts are not searchable. The resources show up in the sidebar, but they are not searchable.
<rdar://problem/24643587>
Created attachment 271282 [details] [PATCH] Work In Progress I'm a bit skeptical of this patch at the moment, but I'm putting it up for feedback. It seems Page.searchInResources only walks the CachedResources that are still around for frames/documents. Unfortunately XHR resources, and other "Raw Resources" (Worker script) are not included in this list. The NetworkAgent is told about these Raw CachedResources before they are destroyed, and was saving their data in the NetworkResourcesData class off of the NetworkAgent. So we could ask the NetworkAgent to search its "Other Resources", which I just called "searchRequests" here... But this seems to capture all the resources NOT searched by PageAgent. This lets us search in a near identical way to searching Page resources. Page.searchInResources => Page.searchInResource(frameId, url) => frameId, url, match info => UI Network.searchInRequests => Network.searchRequest(requestId) (frameId is known) => frameId, url, match info => UI I'm guessing NetworkResourcesData was actually used for a different purpose (XHR Replay?) but we can take advantage of it here for searching XHRs. The one caveat is, like all things NetworkAgent related, the inspector has to be open to capture the content of XHRs. You can't search XHRs that happened before the inspector was opened. I think that is fine / to be expected. The same way scripts get garbage collected, resources do as well.
Comment on attachment 271282 [details] [PATCH] Work In Progress Looks good.
Thought about this a bit. Really, Page.searchInResources should just be doing this. On the backend, PageAgent can can shimmy on over to the NetworkAgent for the data it needs, but it doesn't seem useful to add Network agent protocol methods for this.
<rdar://problem/16660513>
Created attachment 276056 [details] [PATCH] Proposed Fix
Comment on attachment 276056 [details] [PATCH] Proposed Fix Clearing flags on attachment: 276056 Committed r199263: <http://trac.webkit.org/changeset/199263>
All reviewed patches have been landed. Closing bug.