NEW 185004
DocumentLoader::loadMainResource() does not use main document's cache partition name for subframe document contrary to comment
https://bugs.webkit.org/show_bug.cgi?id=185004
Summary DocumentLoader::loadMainResource() does not use main document's cache partiti...
Daniel Bates
Reported 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. mainResourceRequest.setDomainForCachePartition(*m_frame->document()); ... ]] <https://trac.webkit.org/browser/trunk/Source/WebCore/loader/DocumentLoader.cpp?rev=+230944#L1732>
Attachments
Radar WebKit Bug Importer
Comment 1 2018-04-25 16:50:15 PDT
Note You need to log in before you can comment on or make changes to this bug.