dispatchDidLoadResourceFromMemoryCache doesn't pass resource type to browser correctly |
|||
Issue descriptionWhat steps will reproduce the problem? (1) Put a resource into the memory cache. (2) Request the same resource again to get it from the memory cache. (3) Wait for the message FrameHostMsg_DidLoadResourceFromMemoryCache from renderer. What is the expected result? WebContentsImpl::OnDidLoadResourceFromMemoryCache expects to have correct resource type passed as parameter. What happens instead? Resource type is always equal to content::RESOURCE_TYPE_SUB_RESOURCE. The bug is located in FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(). When we "convert" the resource into blink::ResourceRequest to pass it to FrameLoaderClient, we use default value of WebURLRequest::RequestContext that then is converted to resource type in RenderFrameImpl::didLoadResourceFromMemoryCache(). Proposed fix: Set the right value of WebURLRequest::RequestContext in FrameFetchContext::dispatchDidLoadResourceFromMemoryCache().
,
Nov 10 2016
+yoav and core/loader owners
,
Nov 15 2016
Yeah, seems reasonable to set the right context to ResourceRequest in FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(). We already have that info there, so the fix should be straight forward. You can probably test it by adding a unit test to FrameFetchContextTest.cpp
,
Nov 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6a5b9a93ca59066746f7e46a6f4a8e2594d3bb07 commit 6a5b9a93ca59066746f7e46a6f4a8e2594d3bb07 Author: alexilin <alexilin@chromium.org> Date: Mon Nov 28 10:31:25 2016 Pass correct resource type to OnDidLoadResourceFromMemoryCache. Resource type isn't passed to browser correctly. More details in https://crbug.com/664135 This is an attempt to fix it. BUG= 664135 Review-Url: https://codereview.chromium.org/2494713002 Cr-Commit-Position: refs/heads/master@{#434629} [modify] https://crrev.com/6a5b9a93ca59066746f7e46a6f4a8e2594d3bb07/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp [modify] https://crrev.com/6a5b9a93ca59066746f7e46a6f4a8e2594d3bb07/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
,
Nov 28 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 Deleted