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>
<rdar://problem/39740615>