Bug 185004 - DocumentLoader::loadMainResource() does not use main document's cache partition name for subframe document contrary to comment
Summary: DocumentLoader::loadMainResource() does not use main document's cache partiti...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on: 168806
  Show dependency treegraph
Reported: 2018-04-25 15:44 PDT by Daniel Bates
Modified: 2018-04-25 16:50 PDT (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-04-25 15:44:09 PDT
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.
Comment 1 Radar WebKit Bug Importer 2018-04-25 16:50:15 PDT