Bug 185004
Summary: | DocumentLoader::loadMainResource() does not use main document's cache partition name for subframe document contrary to comment | ||
---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | achristensen, beidson, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 168806 | ||
Bug Blocks: |
Daniel Bates
In DocumentLoader::loadMainResource() there is a comment that we should use the cache partition of the main document when loading a subframe. But we do not do that. Should we do it? Is the comment incorrect?
[[
void DocumentLoader::loadMainResource(ResourceRequest&& request)
{
static NeverDestroyed<ResourceLoaderOptions> mainResourceLoadOptions(SendCallbacks, SniffContent, BufferData, StoredCredentialsPolicy::Use, ClientCredentialPolicy::MayAskClientForCredentials, FetchOptions::Credentials::Include, SkipSecurityCheck, FetchOptions::Mode::Navigate, IncludeCertificateInfo, ContentSecurityPolicyImposition::SkipPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching);
CachedResourceRequest mainResourceRequest(ResourceRequest(request), mainResourceLoadOptions);
if (!m_frame->isMainFrame() && m_frame->document()) {
// If we are loading the main resource of a subframe, use the cache partition of the main document.
mainResourceRequest.setDomainForCachePartition(*m_frame->document());
...
]]
<https://trac.webkit.org/browser/trunk/Source/WebCore/loader/DocumentLoader.cpp?rev=+230944#L1732>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/39740615>