WebKit Bugzilla
Attachment 358591 Details for
Bug 193236
: Stop using NetworkStorageSession in WebProcess
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193236-20190108080744.patch (text/plain), 28.61 KB, created by
Alex Christensen
on 2019-01-08 08:07:45 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-08 08:07:45 PST
Size:
28.61 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 239724) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2019-01-08 Alex Christensen <achristensen@webkit.org> >+ >+ Stop using NetworkStorageSession in WebProcess >+ https://bugs.webkit.org/show_bug.cgi?id=193236 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No change in behavior. Some code was only used for ResourceHandle, which isn't used in modern WebKit, >+ and for cookies, which are handled in the NetworkProcess in modern WebKit. >+ >+ * loader/CookieJar.cpp: >+ (WebCore::storageSession): >+ * loader/EmptyClients.cpp: >+ * platform/network/NetworkingContext.h: >+ * platform/network/mac/ResourceHandleMac.mm: >+ (WebCore::ResourceHandle::createNSURLConnection): >+ (WebCore::ResourceHandle::start): >+ (WebCore::ResourceHandle::platformLoadResourceSynchronously): >+ (WebCore::ResourceHandle::willSendRequest): >+ (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): >+ (WebCore::ResourceHandle::receivedCredential): >+ > 2019-01-08 Alex Christensen <achristensen@webkit.org> > > Move Windows-specific code from NetworkStorageSessionCFNet.cpp to its own file >Index: Source/WebCore/loader/CookieJar.cpp >=================================================================== >--- Source/WebCore/loader/CookieJar.cpp (revision 239670) >+++ Source/WebCore/loader/CookieJar.cpp (working copy) >@@ -54,7 +54,7 @@ static NetworkingContext* networkingCont > inline NetworkStorageSession& storageSession(const Document& document) > { > NetworkingContext* context = networkingContext(document); >- return context ? context->storageSession() : NetworkStorageSession::defaultStorageSession(); >+ return context ? *context->storageSession() : NetworkStorageSession::defaultStorageSession(); > } > > static IncludeSecureCookies shouldIncludeSecureCookies(const Document& document, const URL& url) >Index: Source/WebCore/loader/EmptyClients.cpp >=================================================================== >--- Source/WebCore/loader/EmptyClients.cpp (revision 239670) >+++ Source/WebCore/loader/EmptyClients.cpp (working copy) >@@ -287,7 +287,7 @@ private: > EmptyFrameNetworkingContext(); > > bool shouldClearReferrerOnHTTPSToHTTPRedirect() const { return true; } >- NetworkStorageSession& storageSession() const final { return NetworkStorageSession::defaultStorageSession(); } >+ NetworkStorageSession* storageSession() const final { return &NetworkStorageSession::defaultStorageSession(); } > > #if PLATFORM(COCOA) > bool localFileContentSniffingEnabled() const { return false; } >Index: Source/WebCore/platform/network/NetworkingContext.h >=================================================================== >--- Source/WebCore/platform/network/NetworkingContext.h (revision 239670) >+++ Source/WebCore/platform/network/NetworkingContext.h (working copy) >@@ -58,7 +58,7 @@ public: > > virtual String sourceApplicationIdentifier() const { return emptyString(); } > >- virtual NetworkStorageSession& storageSession() const = 0; >+ virtual NetworkStorageSession* storageSession() const = 0; > > #if PLATFORM(WIN) > virtual ResourceError blockedError(const ResourceRequest&) const = 0; >Index: Source/WebCore/platform/network/mac/ResourceHandleMac.mm >=================================================================== >--- Source/WebCore/platform/network/mac/ResourceHandleMac.mm (revision 239670) >+++ Source/WebCore/platform/network/mac/ResourceHandleMac.mm (working copy) >@@ -157,12 +157,12 @@ void ResourceHandle::createNSURLConnecti > if (d->m_user.isEmpty() && d->m_pass.isEmpty()) { > // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication, > // try and reuse the credential preemptively, as allowed by RFC 2617. >- d->m_initialCredential = d->m_context->storageSession().credentialStorage().get(firstRequest().cachePartition(), firstRequest().url()); >+ d->m_initialCredential = d->m_context->storageSession()->credentialStorage().get(firstRequest().cachePartition(), firstRequest().url()); > } else { > // If there is already a protection space known for the URL, update stored credentials before sending a request. > // This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately > // (so that an authentication dialog doesn't pop up). >- d->m_context->storageSession().credentialStorage().set(firstRequest().cachePartition(), Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url()); >+ d->m_context->storageSession()->credentialStorage().set(firstRequest().cachePartition(), Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url()); > } > } > >@@ -240,7 +240,7 @@ bool ResourceHandle::start() > if (!d->m_context->isValid()) > return false; > >- d->m_storageSession = d->m_context->storageSession().platformSession(); >+ d->m_storageSession = d->m_context->storageSession()->platformSession(); > > // FIXME: Do not use the sync version of shouldUseCredentialStorage when the client returns true from usesAsyncCallbacks. > bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this); >@@ -367,7 +367,7 @@ void ResourceHandle::platformLoadResourc > bool shouldContentEncodingSniff = true; > RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(context, request, &client, defersLoading, shouldContentSniff, shouldContentEncodingSniff)); > >- handle->d->m_storageSession = context->storageSession().platformSession(); >+ handle->d->m_storageSession = context->storageSession()->platformSession(); > > if (context && handle->d->m_scheduledFailureType != NoFailure) { > error = context->blockedError(request); >@@ -449,7 +449,7 @@ void ResourceHandle::willSendRequest(Res > // Only consider applying authentication credentials if this is actually a redirect and the redirect > // URL didn't include credentials of its own. > if (d->m_user.isEmpty() && d->m_pass.isEmpty() && !redirectResponse.isNull()) { >- Credential credential = d->m_context->storageSession().credentialStorage().get(request.cachePartition(), request.url()); >+ Credential credential = d->m_context->storageSession()->credentialStorage().get(request.cachePartition(), request.url()); > if (!credential.isEmpty()) { > d->m_initialCredential = credential; > >@@ -540,16 +540,16 @@ bool ResourceHandle::tryHandlePasswordBa > // The stored credential wasn't accepted, stop using it. > // There is a race condition here, since a different credential might have already been stored by another ResourceHandle, > // but the observable effect should be very minor, if any. >- d->m_context->storageSession().credentialStorage().remove(d->m_partition, challenge.protectionSpace()); >+ d->m_context->storageSession()->credentialStorage().remove(d->m_partition, challenge.protectionSpace()); > } > > if (!challenge.previousFailureCount()) { >- Credential credential = d->m_context->storageSession().credentialStorage().get(d->m_partition, challenge.protectionSpace()); >+ Credential credential = d->m_context->storageSession()->credentialStorage().get(d->m_partition, challenge.protectionSpace()); > if (!credential.isEmpty() && credential != d->m_initialCredential) { > ASSERT(credential.persistence() == CredentialPersistenceNone); > if (challenge.failureResponse().httpStatusCode() == 401) { > // Store the credential back, possibly adding it as a default for this directory. >- d->m_context->storageSession().credentialStorage().set(d->m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); >+ d->m_context->storageSession()->credentialStorage().set(d->m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); > } > [challenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:mac(challenge)]; > return true; >@@ -591,7 +591,7 @@ void ResourceHandle::receivedCredential( > URL urlToStore; > if (challenge.failureResponse().httpStatusCode() == 401) > urlToStore = challenge.failureResponse().url(); >- d->m_context->storageSession().credentialStorage().set(d->m_partition, webCredential, ProtectionSpace([d->m_currentMacChallenge protectionSpace]), urlToStore); >+ d->m_context->storageSession()->credentialStorage().set(d->m_partition, webCredential, ProtectionSpace([d->m_currentMacChallenge protectionSpace]), urlToStore); > [[d->m_currentMacChallenge sender] useCredential:webCredential.nsCredential() forAuthenticationChallenge:d->m_currentMacChallenge]; > } else > [[d->m_currentMacChallenge sender] useCredential:credential.nsCredential() forAuthenticationChallenge:d->m_currentMacChallenge]; >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 239724) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,39 @@ >+2019-01-08 Alex Christensen <achristensen@webkit.org> >+ >+ Stop using NetworkStorageSession in WebProcess >+ https://bugs.webkit.org/show_bug.cgi?id=193236 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/WebProcessCreationParameters.cpp: >+ (WebKit::WebProcessCreationParameters::encode const): >+ (WebKit::WebProcessCreationParameters::decode): >+ * Shared/WebProcessCreationParameters.h: >+ * Shared/WebsitePoliciesData.cpp: >+ (WebKit::WebsitePoliciesData::applyToDocumentLoader): >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled): >+ (WebKit::WebProcessPool::tryTakePrewarmedProcess): >+ (WebKit::WebProcessPool::initializeNewWebProcess): >+ (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore): >+ (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore): >+ (WebKit::WebProcessPool::processForNavigationInternal): >+ * WebProcess/InjectedBundle/InjectedBundle.cpp: >+ (WebKit::InjectedBundle::setPrivateBrowsingEnabled): >+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: >+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: >+ (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Deleted. >+ (WebKit::WebFrameNetworkingContext::storageSession const): Deleted. >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::setSessionID): >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::initializeWebProcess): >+ (WebKit::WebProcess::fetchWebsiteData): >+ (WebKit::WebProcess::addWebsiteDataStore): Deleted. >+ (WebKit::WebProcess::destroySession): Deleted. >+ * WebProcess/WebProcess.h: >+ * WebProcess/WebProcess.messages.in: >+ > 2019-01-08 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Update OptionsGTK.cmake and NEWS for 2.23.2 release >Index: Source/WebKit/Shared/WebProcessCreationParameters.cpp >=================================================================== >--- Source/WebKit/Shared/WebProcessCreationParameters.cpp (revision 239670) >+++ Source/WebKit/Shared/WebProcessCreationParameters.cpp (working copy) >@@ -72,7 +72,6 @@ void WebProcessCreationParameters::encod > encoder << shouldCaptureVideoInUIProcess; > encoder << shouldCaptureDisplayInUIProcess; > #endif >- encoder << shouldUseTestingNetworkSession; > encoder << urlSchemesRegisteredAsEmptyDocument; > encoder << urlSchemesRegisteredAsSecure; > encoder << urlSchemesRegisteredAsBypassingContentSecurityPolicy; >@@ -267,8 +266,6 @@ bool WebProcessCreationParameters::decod > if (!decoder.decode(parameters.shouldCaptureDisplayInUIProcess)) > return false; > #endif >- if (!decoder.decode(parameters.shouldUseTestingNetworkSession)) >- return false; > if (!decoder.decode(parameters.urlSchemesRegisteredAsEmptyDocument)) > return false; > if (!decoder.decode(parameters.urlSchemesRegisteredAsSecure)) >Index: Source/WebKit/Shared/WebProcessCreationParameters.h >=================================================================== >--- Source/WebKit/Shared/WebProcessCreationParameters.h (revision 239670) >+++ Source/WebKit/Shared/WebProcessCreationParameters.h (working copy) >@@ -124,7 +124,6 @@ struct WebProcessCreationParameters { > > double defaultRequestTimeoutInterval { INT_MAX }; > >- bool shouldUseTestingNetworkSession { false }; > bool shouldAlwaysUseComplexTextCodePath { false }; > bool shouldEnableMemoryPressureReliefLogging { false }; > bool shouldSuppressMemoryPressureHandler { false }; >Index: Source/WebKit/Shared/WebsitePoliciesData.cpp >=================================================================== >--- Source/WebKit/Shared/WebsitePoliciesData.cpp (revision 239670) >+++ Source/WebKit/Shared/WebsitePoliciesData.cpp (working copy) >@@ -161,11 +161,8 @@ void WebsitePoliciesData::applyToDocumen > > if (websitePolicies.websiteDataStoreParameters) { > if (auto* frame = documentLoader.frame()) { >- if (auto* page = frame->page()) { >- auto sessionID = websitePolicies.websiteDataStoreParameters->networkSessionParameters.sessionID; >- WebProcess::singleton().addWebsiteDataStore(WTFMove(*websitePolicies.websiteDataStoreParameters)); >- page->setSessionID(sessionID); >- } >+ if (auto* page = frame->page()) >+ page->setSessionID(websitePolicies.websiteDataStoreParameters->networkSessionParameters.sessionID); > } > } > } >Index: Source/WebKit/UIProcess/WebProcessPool.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebProcessPool.cpp (revision 239670) >+++ Source/WebKit/UIProcess/WebProcessPool.cpp (working copy) >@@ -689,10 +689,8 @@ void WebProcessPool::setAnyPageGroupMigh > { > if (privateBrowsingEnabled) { > sendToNetworkingProcess(Messages::NetworkProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters())); >- sendToAllProcesses(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters())); > } else { > networkProcess()->removeSession(PAL::SessionID::legacyPrivateSessionID()); >- sendToAllProcesses(Messages::WebProcess::DestroySession(PAL::SessionID::legacyPrivateSessionID())); > } > } > >@@ -765,8 +763,6 @@ RefPtr<WebProcessProxy> WebProcessPool:: > > ASSERT(m_prewarmedProcess->isPrewarmed()); > m_prewarmedProcess->markIsNoLongerInPrewarmedPool(); >- if (&m_prewarmedProcess->websiteDataStore() != &websiteDataStore) >- m_prewarmedProcess->send(Messages::WebProcess::AddWebsiteDataStore(websiteDataStore.parameters()), 0); > > return std::exchange(m_prewarmedProcess, nullptr); > } >@@ -854,8 +850,6 @@ void WebProcessPool::initializeNewWebPro > SandboxExtension::createHandleWithoutResolvingPath(parameters.javaScriptConfigurationDirectory, SandboxExtension::Type::ReadWrite, parameters.javaScriptConfigurationDirectoryExtensionHandle); > } > >- parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession; >- > parameters.cacheModel = cacheModel(); > parameters.languages = userPreferredLanguages(); > >@@ -942,9 +936,6 @@ void WebProcessPool::initializeNewWebPro > process.send(Messages::WebProcess::SetQOS(webProcessLatencyQOS(), webProcessThroughputQOS()), 0); > #endif > >- if (WebPreferences::anyPagesAreUsingPrivateBrowsing()) >- process.send(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters()), 0); >- > if (m_automationSession) > process.send(Messages::WebProcess::EnsureAutomationSessionProxy(m_automationSession->sessionIdentifier()), 0); > >@@ -1188,12 +1179,10 @@ void WebProcessPool::pageBeginUsingWebsi > ASSERT(page.websiteDataStore().parameters().networkSessionParameters.sessionID == sessionID); > if (m_networkProcess) > m_networkProcess->addSession(makeRef(page.websiteDataStore())); >- page.process().send(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(sessionID)), 0); > page.websiteDataStore().clearPendingCookies(); > } else if (sessionID != PAL::SessionID::defaultSessionID()) { > if (m_networkProcess) > m_networkProcess->addSession(makeRef(page.websiteDataStore())); >- page.process().send(Messages::WebProcess::AddWebsiteDataStore(page.websiteDataStore().parameters()), 0); > page.websiteDataStore().clearPendingCookies(); > } > >@@ -1224,7 +1213,6 @@ void WebProcessPool::pageEndUsingWebsite > // The last user of this non-default PAL::SessionID is gone, so clean it up in the child processes. > if (networkProcess()) > networkProcess()->removeSession(sessionID); >- page.process().send(Messages::WebProcess::DestroySession(sessionID), 0); > } > } > >@@ -2238,9 +2226,6 @@ void WebProcessPool::processForNavigatio > if (&(*it)->page() == &page) > m_suspendedPages.remove(it); > >- if (&process->websiteDataStore() != &page.websiteDataStore()) >- process->send(Messages::WebProcess::AddWebsiteDataStore(page.websiteDataStore().parameters()), 0); >- > return completionHandler(WTFMove(process), nullptr, reason); > } > >Index: Source/WebKit/WebProcess/WebProcess.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.cpp (revision 239671) >+++ Source/WebKit/WebProcess/WebProcess.cpp (working copy) >@@ -381,9 +381,6 @@ void WebProcess::initializeWebProcess(We > > setShouldUseFontSmoothing(parameters.shouldUseFontSmoothing); > >- if (parameters.shouldUseTestingNetworkSession) >- NetworkStorageSession::switchToNewTestingSession(); >- > ensureNetworkProcessConnection(); > > setTerminationTimeout(parameters.terminationTimeout); >@@ -540,16 +537,6 @@ void WebProcess::fullKeyboardAccessModeC > m_fullKeyboardAccessEnabled = fullKeyboardAccessEnabled; > } > >-void WebProcess::addWebsiteDataStore(WebsiteDataStoreParameters&& parameters) >-{ >- WebFrameNetworkingContext::ensureWebsiteDataStoreSession(WTFMove(parameters)); >-} >- >-void WebProcess::destroySession(PAL::SessionID sessionID) >-{ >- SessionTracker::destroySession(sessionID); >-} >- > void WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess() > { > ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::EnsureLegacyPrivateBrowsingSession(), 0); >@@ -1294,11 +1281,6 @@ void WebProcess::fetchWebsiteData(PAL::S > for (auto& origin : MemoryCache::singleton().originsWithCache(sessionID)) > websiteData.entries.append(WebsiteData::Entry { origin->data(), WebsiteDataType::MemoryCache, 0 }); > } >- >- if (websiteDataTypes.contains(WebsiteDataType::Credentials)) { >- if (NetworkStorageSession::storageSession(sessionID)) >- websiteData.originsWithCredentials = NetworkStorageSession::storageSession(sessionID)->credentialStorage().originsWithCredentials(); >- } > } > > void WebProcess::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, WallTime modifiedSince) >Index: Source/WebKit/WebProcess/WebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.h (revision 239683) >+++ Source/WebKit/WebProcess/WebProcess.h (working copy) >@@ -178,8 +178,6 @@ public: > void setCacheModel(CacheModel); > > void ensureLegacyPrivateBrowsingSessionInNetworkProcess(); >- void addWebsiteDataStore(WebsiteDataStoreParameters&&); >- void destroySession(PAL::SessionID); > > void pageDidEnterWindow(uint64_t pageID); > void pageWillLeaveWindow(uint64_t pageID); >Index: Source/WebKit/WebProcess/WebProcess.messages.in >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.messages.in (revision 239671) >+++ Source/WebKit/WebProcess/WebProcess.messages.in (working copy) >@@ -53,9 +53,6 @@ messages -> WebProcess LegacyReceiver { > > ClearCachedCredentials() > >- AddWebsiteDataStore(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters); >- DestroySession(PAL::SessionID sessionID) >- > # Plug-ins. > DidAddPlugInAutoStartOriginHash(uint32_t hash, WallTime expirationTime, PAL::SessionID sessionID) > ResetPlugInAutoStartOriginDefaultHashes(HashMap<uint32_t,WallTime> hashes) >Index: Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (revision 239670) >+++ Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (working copy) >@@ -357,7 +357,6 @@ void InjectedBundle::setPrivateBrowsingE > ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); > if (enabled) { > WebProcess::singleton().ensureLegacyPrivateBrowsingSessionInNetworkProcess(); >- WebFrameNetworkingContext::ensureWebsiteDataStoreSession(WebsiteDataStoreParameters::legacyPrivateSessionParameters()); > } else > SessionTracker::destroySession(PAL::SessionID::legacyPrivateSessionID()); > >Index: Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (revision 239670) >+++ Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (working copy) >@@ -56,7 +56,7 @@ private: > RetainPtr<CFDataRef> sourceApplicationAuditData() const override; > String sourceApplicationIdentifier() const override; > WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override; >- WebCore::NetworkStorageSession& storageSession() const override; >+ WebCore::NetworkStorageSession* storageSession() const override { return nullptr; } > }; > > } >Index: Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (revision 239683) >+++ Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (working copy) >@@ -43,20 +43,6 @@ > namespace WebKit { > using namespace WebCore; > >-void WebFrameNetworkingContext::ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&& parameters) >-{ >- ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); >- auto sessionID = parameters.networkSessionParameters.sessionID; >- if (NetworkStorageSession::storageSession(sessionID)) >- return; >- >- String base = WebProcess::singleton().uiProcessBundleIdentifier(); >- if (base.isNull()) >- base = [[NSBundle mainBundle] bundleIdentifier]; >- >- NetworkStorageSession::ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID())); >-} >- > bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const > { > return frame() && frame()->settings().localFileContentSniffingEnabled(); >@@ -84,19 +70,6 @@ ResourceError WebFrameNetworkingContext: > return frame()->loader().client().blockedError(request); > } > >-NetworkStorageSession& WebFrameNetworkingContext::storageSession() const >-{ >- ASSERT(RunLoop::isMain()); >- ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); >- if (frame()) { >- if (auto* storageSession = WebCore::NetworkStorageSession::storageSession(frame()->page()->sessionID())) >- return *storageSession; >- // Some requests may still be coming shortly after WebProcess was told to destroy its session. >- LOG_ERROR("WEB Invalid session ID. Please file a bug unless you just disabled private browsing, in which case it's an expected race."); >- } >- return NetworkStorageSession::defaultStorageSession(); >-} >- > WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const > { > if (!frame()) >Index: Source/WebKit/WebProcess/WebPage/WebPage.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.cpp (revision 239670) >+++ Source/WebKit/WebProcess/WebPage/WebPage.cpp (working copy) >@@ -3038,8 +3038,6 @@ void WebPage::setLayerHostingMode(LayerH > > void WebPage::setSessionID(PAL::SessionID sessionID) > { >- if (sessionID.isEphemeral()) >- WebProcess::singleton().addWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(sessionID)); > m_page->setSessionID(sessionID); > } > >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 239670) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2019-01-08 Alex Christensen <achristensen@webkit.org> >+ >+ Stop using NetworkStorageSession in WebProcess >+ https://bugs.webkit.org/show_bug.cgi?id=193236 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/WebFrameNetworkingContext.h: >+ * WebCoreSupport/WebFrameNetworkingContext.mm: >+ (WebFrameNetworkingContext::storageSession const): >+ * WebView/WebView.mm: >+ (-[WebView _cachedResponseForURL:]): >+ (-[WebView _clearCredentials]): >+ > 2019-01-04 Alex Christensen <achristensen@webkit.org> > > Progress towards fixing Mac CMake build >Index: Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.h >=================================================================== >--- Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.h (revision 239670) >+++ Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.h (working copy) >@@ -49,5 +49,5 @@ private: > RetainPtr<CFDataRef> sourceApplicationAuditData() const override; > String sourceApplicationIdentifier() const override; > WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override; >- WebCore::NetworkStorageSession& storageSession() const override; >+ WebCore::NetworkStorageSession* storageSession() const override; > }; >Index: Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.mm (revision 239670) >+++ Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.mm (working copy) >@@ -90,14 +90,14 @@ ResourceError WebFrameNetworkingContext: > return frame()->loader().client().blockedError(request); > } > >-NetworkStorageSession& WebFrameNetworkingContext::storageSession() const >+NetworkStorageSession* WebFrameNetworkingContext::storageSession() const > { > ASSERT(isMainThread()); > if (frame() && frame()->page() && frame()->page()->sessionID().isEphemeral()) { > if (auto* session = NetworkStorageSession::storageSession(PAL::SessionID::legacyPrivateSessionID())) >- return *session; >+ return session; > // Some requests may still be coming shortly before WebCore updates the session ID and after WebKit destroys the private browsing session. > LOG_ERROR("Invalid session ID. Please file a bug unless you just disabled private browsing, in which case it's an expected race."); > } >- return NetworkStorageSession::defaultStorageSession(); >+ return &NetworkStorageSession::defaultStorageSession(); > } >Index: Source/WebKitLegacy/mac/WebView/WebView.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebView.mm (revision 239670) >+++ Source/WebKitLegacy/mac/WebView/WebView.mm (working copy) >@@ -3668,7 +3668,7 @@ - (NSCachedURLResponse *)_cachedResponse > if (!_private->page) > return nil; > >- if (CFURLStorageSessionRef storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession().platformSession()) >+ if (CFURLStorageSessionRef storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession()->platformSession()) > cachedResponse = cachedResponseForRequest(storageSession, request.get()); > else > cachedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:request.get()]; >@@ -9251,7 +9251,7 @@ - (void)_clearCredentials > if (!networkingContext) > return; > >- networkingContext->storageSession().credentialStorage().clearCredentials(); >+ networkingContext->storageSession()->credentialStorage().clearCredentials(); > } > > - (BOOL)_needsOneShotDrawingSynchronization
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193236
:
358591
|
358596
|
358602
|
358623