* STEPS TO REPRODUCE 1. Load page with source map resources. 2. Inspect page 3. Reload page from inspector (so that source map resources load from cache) => Source map loads show up as page loaded resources instead of getting hidden
The issue is that when there is a cached resource load of a frontend loaded resource, WebCore send their resource load notifier delegates with a fresh ResourceRequest, losing out on the flags from the original resource request. For example: lldb> bt * frame #0: WebCore`WebCore::InspectorResourceAgent::willSendRequest ... frame #5: WebCore`WebCore::FrameLoader::loadedResourceFromMemoryCache frame #6: WebCore`WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache frame #7: WebCore`WebCore::CachedResourceLoader::requestResource frame #8: WebCore`WebCore::CachedResourceLoader::requestRawResource frame #9: WebCore`WebCore::DocumentThreadableLoader::loadRequest ... frame #15: WebCore`WebCore::XMLHttpRequest::send frame #16: WebCore`WebCore::XMLHttpRequest::send frame #17: WebCore`WebCore::XMLHttpRequest::sendForInspector The XHR send for inspector sets "hiddenFromInspector" on the resource request. Later in requestResource we determine we can reuse the cached resource from the cache, and go through the notifer process with a new request that only copies the URL from the original request.
Created attachment 226345 [details] [PATCH] Proposed Fix Proposed fix. Brady, can we pass this option (hiddenFromInspector) into loadedResourceFromMemoryCache in a cleaner way then this? As far as I can tell, these functions are all only used once in this path, there are no other callers.
Comment on attachment 226345 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=226345&action=review > Source/WebCore/loader/FrameLoader.cpp:3002 > newRequest = ResourceRequest(resource->url()); It might just be best if the caller did this. That would remove the dance you have to do.
Comment on attachment 226345 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=226345&action=review >> Source/WebCore/loader/FrameLoader.cpp:3002 >> newRequest = ResourceRequest(resource->url()); > > It might just be best if the caller did this. That would remove the dance you have to do. I like that idea, seeing that this is only called in one place.
Created attachment 226378 [details] [PATCH] For Landing
Comment on attachment 226378 [details] [PATCH] For Landing Clearing flags on attachment: 226378 Committed r165427: <http://trac.webkit.org/changeset/165427>
<rdar://problem/23673692>