[Webkit-unassigned] [Bug 185004] New: DocumentLoader::loadMainResource() does not use main document's cache partition name for subframe document contrary to comment

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 25 15:44:09 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185004

            Bug ID: 185004
           Summary: DocumentLoader::loadMainResource() does not use main
                    document's cache partition name for subframe document
                    contrary to comment
           Product: WebKit
           Version: WebKit Local Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dbates at webkit.org

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>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180425/dfa06320/attachment.html>


More information about the webkit-unassigned mailing list