WebKit Bugzilla
Attachment 358720 Details for
Bug 193266
: Replace SessionTracker with HashMap member of NetworkProcess
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193266-20190109114855.patch (text/plain), 53.62 KB, created by
Alex Christensen
on 2019-01-09 11:48:56 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-09 11:48:56 PST
Size:
53.62 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 239762) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,72 @@ >+2019-01-09 Alex Christensen <achristensen@webkit.org> >+ >+ Replace SessionTracker with HashMap member of NetworkProcess >+ https://bugs.webkit.org/show_bug.cgi?id=193266 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/Downloads/DownloadManager.cpp: >+ (WebKit::DownloadManager::startDownload): >+ * NetworkProcess/Downloads/DownloadManager.h: >+ * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: >+ (WebKit::Download::resume): >+ * NetworkProcess/NetworkCORSPreflightChecker.cpp: >+ (WebKit::NetworkCORSPreflightChecker::startPreflight): >+ * NetworkProcess/NetworkConnectionToWebProcess.cpp: >+ (WebKit::NetworkConnectionToWebProcess::preconnectTo): >+ (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): >+ (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): >+ (WebKit::NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession): >+ * NetworkProcess/NetworkConnectionToWebProcess.h: >+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in: >+ * NetworkProcess/NetworkProcess.cpp: >+ (WebKit::NetworkProcess::initializeNetworkProcess): >+ (WebKit::NetworkProcess::clearCachedCredentials): >+ (WebKit::NetworkProcess::networkSession): >+ (WebKit::NetworkProcess::setSession): >+ (WebKit::NetworkProcess::destroySession): >+ (WebKit::NetworkProcess::preconnectTo): >+ * NetworkProcess/NetworkProcess.h: >+ * NetworkProcess/NetworkResourceLoader.cpp: >+ (WebKit::NetworkResourceLoader::startNetworkLoad): >+ (WebKit::NetworkResourceLoader::didFinishLoading): >+ (WebKit::NetworkResourceLoader::sendResultForCacheEntry): >+ (WebKit::NetworkResourceLoader::shouldLogCookieInformation): >+ (WebKit::NetworkResourceLoader::logCookieInformation const): >+ (WebKit::logBlockedCookieInformation): >+ (WebKit::logCookieInformationInternal): >+ (WebKit::NetworkResourceLoader::logCookieInformation): >+ * NetworkProcess/NetworkResourceLoader.h: >+ * NetworkProcess/PingLoad.cpp: >+ (WebKit::PingLoad::loadRequest): >+ * NetworkProcess/PingLoad.h: >+ * NetworkProcess/PreconnectTask.cpp: >+ (WebKit::PreconnectTask::PreconnectTask): >+ * NetworkProcess/PreconnectTask.h: >+ * NetworkProcess/RemoteNetworkingContext.h: >+ * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: >+ (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): >+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: >+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm: >+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm: >+ * NetworkProcess/mac/RemoteNetworkingContext.mm: >+ (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): >+ * Shared/SessionTracker.cpp: Removed. >+ * Shared/SessionTracker.h: Removed. >+ * Sources.txt: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/InjectedBundle/InjectedBundle.cpp: >+ (WebKit::InjectedBundle::setPrivateBrowsingEnabled): >+ * WebProcess/Network/WebLoaderStrategy.cpp: >+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: >+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: >+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: >+ * WebProcess/WebPage/WebPage.cpp: >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess): >+ * WebProcess/WebProcess.h: >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ > 2019-01-08 Alex Christensen <achristensen@webkit.org> > > Fix CompletionHandler assertions introduced today. >Index: Source/WebKit/Sources.txt >=================================================================== >--- Source/WebKit/Sources.txt (revision 239762) >+++ Source/WebKit/Sources.txt (working copy) >@@ -116,7 +116,6 @@ Shared/PrintInfo.cpp > Shared/RTCNetwork.cpp > Shared/RTCPacketOptions.cpp > Shared/SessionState.cpp >-Shared/SessionTracker.cpp > Shared/ShareableBitmap.cpp @no-unify > Shared/ShareableResource.cpp > Shared/SharedStringHashStore.cpp >Index: Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp (working copy) >@@ -31,7 +31,6 @@ > #include "Logging.h" > #include "NetworkLoadParameters.h" > #include "NetworkProcess.h" >-#include "SessionTracker.h" > #include <WebCore/CrossOriginAccessControl.h> > > #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_parameters.sessionID.isAlwaysOnLoggingAllowed(), Network, "%p - NetworkCORSPreflightChecker::" fmt, this, ##__VA_ARGS__) >@@ -72,7 +71,7 @@ void NetworkCORSPreflightChecker::startP > if (m_shouldCaptureExtraNetworkLoadMetrics) > m_loadInformation = NetworkTransactionInformation { NetworkTransactionInformation::Type::Preflight, loadParameters.request, { }, { } }; > >- if (auto* networkSession = SessionTracker::networkSession(loadParameters.sessionID)) { >+ if (auto* networkSession = m_networkProcess->networkSession(loadParameters.sessionID)) { > m_task = NetworkDataTask::create(*networkSession, *this, WTFMove(loadParameters)); > m_task->resume(); > } else >Index: Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (working copy) >@@ -45,7 +45,6 @@ > #include "NetworkSocketStreamMessages.h" > #include "PingLoad.h" > #include "PreconnectTask.h" >-#include "SessionTracker.h" > #include "WebCoreArgumentCoders.h" > #include "WebErrors.h" > #include "WebIDBConnectionToClient.h" >@@ -391,7 +390,7 @@ void NetworkConnectionToWebProcess::pref > void NetworkConnectionToWebProcess::preconnectTo(uint64_t preconnectionIdentifier, NetworkResourceLoadParameters&& parameters) > { > #if ENABLE(SERVER_PRECONNECT) >- new PreconnectTask(WTFMove(parameters), [this, protectedThis = makeRef(*this), identifier = preconnectionIdentifier] (const ResourceError& error) { >+ new PreconnectTask(networkProcess(), WTFMove(parameters), [this, protectedThis = makeRef(*this), identifier = preconnectionIdentifier] (const ResourceError& error) { > didFinishPreconnection(identifier, error); > }); > #else >@@ -451,9 +450,9 @@ void NetworkConnectionToWebProcess::cook > auto& networkStorageSession = storageSession(sessionID); > std::tie(cookieString, secureCookiesAccessed) = networkStorageSession.cookiesForDOM(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >- if (auto session = SessionTracker::networkSession(sessionID)) { >+ if (auto session = networkProcess().networkSession(sessionID)) { > if (session->shouldLogCookieInformation()) >- NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); >+ NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); > } > #endif > } >@@ -463,9 +462,9 @@ void NetworkConnectionToWebProcess::setC > auto& networkStorageSession = storageSession(sessionID); > networkStorageSession.setCookiesFromDOM(firstParty, sameSiteInfo, url, frameID, pageID, cookieString); > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >- if (auto session = SessionTracker::networkSession(sessionID)) { >+ if (auto session = networkProcess().networkSession(sessionID)) { > if (session->shouldLogCookieInformation()) >- NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); >+ NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); > } > #endif > } >@@ -555,6 +554,11 @@ void NetworkConnectionToWebProcess::ensu > m_networkProcess->addWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters()); > } > >+void NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession() >+{ >+ m_networkProcess->destroySession(PAL::SessionID::legacyPrivateSessionID()); >+} >+ > void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID) > { > #if ENABLE(RESOURCE_LOAD_STATISTICS) >Index: Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (working copy) >@@ -171,6 +171,7 @@ private: > void destroySocketStream(uint64_t); > > void ensureLegacyPrivateBrowsingSession(); >+ void destroyLegacyPrivateBrowsingSession(); > > #if ENABLE(INDEXED_DATABASE) > // Messages handlers (Modern IDB). >Index: Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (working copy) >@@ -55,6 +55,7 @@ messages -> NetworkConnectionToWebProces > CreateSocketStream(URL url, PAL::SessionID sessionID, String cachePartition, uint64_t identifier) > > EnsureLegacyPrivateBrowsingSession() >+ DestroyLegacyPrivateBrowsingSession() > > RemoveStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID); > RemoveStorageAccessForAllFramesOnPage(PAL::SessionID sessionID, uint64_t pageID); >Index: Source/WebKit/NetworkProcess/NetworkProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkProcess.cpp (working copy) >@@ -49,7 +49,6 @@ > #include "NetworkSessionCreationParameters.h" > #include "PreconnectTask.h" > #include "RemoteNetworkingContext.h" >-#include "SessionTracker.h" > #include "StatisticsData.h" > #include "WebCookieManager.h" > #include "WebPageProxyMessages.h" >@@ -302,7 +301,7 @@ void NetworkProcess::initializeNetworkPr > NetworkStorageSession::switchToNewTestingSession(); > > auto sessionID = parameters.defaultDataStoreParameters.networkSessionParameters.sessionID; >- SessionTracker::setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters))); >+ setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters))); > > #if ENABLE(INDEXED_DATABASE) > addIndexedDatabaseSession(sessionID, parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle); >@@ -319,7 +318,7 @@ void NetworkProcess::initializeNetworkPr > } > #endif > >- auto* defaultSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID()); >+ auto* defaultSession = networkSession(PAL::SessionID::defaultSessionID()); > for (const auto& cookie : parameters.defaultDataStoreParameters.pendingCookies) > defaultSession->networkStorageSession().setCookie(cookie); > >@@ -432,7 +431,7 @@ void NetworkProcess::createNetworkConnec > void NetworkProcess::clearCachedCredentials() > { > NetworkStorageSession::defaultStorageSession().credentialStorage().clearCredentials(); >- if (auto* networkSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID())) >+ if (auto* networkSession = this->networkSession(PAL::SessionID::defaultSessionID())) > networkSession->clearCredentials(); > else > ASSERT_NOT_REACHED(); >@@ -452,9 +451,21 @@ void NetworkProcess::addWebsiteDataStore > RemoteNetworkingContext::ensureWebsiteDataStoreSession(*this, WTFMove(parameters)); > } > >-void NetworkProcess::destroySession(PAL::SessionID sessionID) >+NetworkSession* NetworkProcess::networkSession(const PAL::SessionID& sessionID) > { >- SessionTracker::destroySession(sessionID); >+ return m_networkSessions.get(sessionID); >+} >+ >+void NetworkProcess::setSession(const PAL::SessionID& sessionID, Ref<NetworkSession>&& session) >+{ >+ m_networkSessions.set(sessionID, WTFMove(session)); >+} >+ >+void NetworkProcess::destroySession(const PAL::SessionID& sessionID) >+{ >+ if (auto session = m_networkSessions.take(sessionID)) >+ session->get().invalidateAndCancel(); >+ NetworkStorageSession::destroySession(sessionID); > m_sessionsControlledByAutomation.remove(sessionID); > CacheStorage::Engine::destroyEngine(*this, sessionID); > >@@ -1033,7 +1044,7 @@ void NetworkProcess::preconnectTo(const > parameters.storedCredentialsPolicy = storedCredentialsPolicy; > parameters.shouldPreconnectOnly = PreconnectOnly::Yes; > >- new PreconnectTask(WTFMove(parameters)); >+ new PreconnectTask(*this, WTFMove(parameters)); > #else > UNUSED_PARAM(url); > UNUSED_PARAM(storedCredentialsPolicy); >Index: Source/WebKit/NetworkProcess/NetworkProcess.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.h (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkProcess.h (working copy) >@@ -125,6 +125,10 @@ public: > > NetworkCache::Cache* cache() { return m_cache.get(); } > >+ void setSession(const PAL::SessionID&, Ref<NetworkSession>&&); >+ NetworkSession* networkSession(const PAL::SessionID&) override; >+ void destroySession(const PAL::SessionID&); >+ > bool canHandleHTTPSServerTrustEvaluation() const { return m_canHandleHTTPSServerTrustEvaluation; } > > void processWillSuspendImminently(bool& handled); >@@ -265,7 +269,6 @@ private: > void didReceiveSyncNetworkProcessMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); > void initializeNetworkProcess(NetworkProcessCreationParameters&&); > void createNetworkConnectionToWebProcess(bool isServiceWorkerProcess, WebCore::SecurityOriginData&&); >- void destroySession(PAL::SessionID); > > void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, uint64_t callbackID); > void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, WallTime modifiedSince, uint64_t callbackID); >@@ -375,8 +378,8 @@ private: > NetworkProcessSupplementMap m_supplements; > > HashSet<PAL::SessionID> m_sessionsControlledByAutomation; >- > HashMap<PAL::SessionID, Vector<CacheStorageParametersCallback>> m_cacheStorageParametersCallbacks; >+ HashMap<PAL::SessionID, Ref<NetworkSession>> m_networkSessions; > > #if PLATFORM(COCOA) > void platformInitializeNetworkProcessCocoa(const NetworkProcessCreationParameters&); >Index: Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (working copy) >@@ -36,7 +36,6 @@ > #include "NetworkLoadChecker.h" > #include "NetworkProcess.h" > #include "NetworkProcessConnectionMessages.h" >-#include "SessionTracker.h" > #include "SharedBufferDataReference.h" > #include "WebCoreArgumentCoders.h" > #include "WebErrors.h" >@@ -284,10 +283,10 @@ void NetworkResourceLoader::startNetwork > if (request.url().protocolIsBlob()) > parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(m_connection, originalRequest().url()); > >- auto* networkSession = SessionTracker::networkSession(parameters.sessionID); >+ auto* networkSession = m_connection->networkProcess().networkSession(parameters.sessionID); > if (!networkSession && parameters.sessionID.isEphemeral()) { > m_connection->networkProcess().addWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(parameters.sessionID)); >- networkSession = SessionTracker::networkSession(parameters.sessionID); >+ networkSession = m_connection->networkProcess().networkSession(parameters.sessionID); > } > if (!networkSession) { > WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID()); >@@ -550,7 +549,7 @@ void NetworkResourceLoader::didFinishLoa > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >- if (shouldLogCookieInformation(sessionID())) >+ if (shouldLogCookieInformation(m_connection, sessionID())) > logCookieInformation(); > #endif > >@@ -850,7 +849,7 @@ void NetworkResourceLoader::sendResultFo > #endif > > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >- if (shouldLogCookieInformation(sessionID())) >+ if (shouldLogCookieInformation(m_connection, sessionID())) > logCookieInformation(); > #endif > >@@ -949,9 +948,9 @@ bool NetworkResourceLoader::shouldCaptur > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >-bool NetworkResourceLoader::shouldLogCookieInformation(const PAL::SessionID& sessionID) >+bool NetworkResourceLoader::shouldLogCookieInformation(NetworkConnectionToWebProcess& connection, const PAL::SessionID& sessionID) > { >- if (auto session = SessionTracker::networkSession(sessionID)) >+ if (auto session = connection.networkProcess().networkSession(sessionID)) > return session->shouldLogCookieInformation(); > return false; > } >@@ -968,17 +967,17 @@ static String escapeIDForJSON(const Opti > > void NetworkResourceLoader::logCookieInformation() const > { >- ASSERT(shouldLogCookieInformation(sessionID())); >+ ASSERT(shouldLogCookieInformation(m_connection, sessionID())); > > auto networkStorageSession = WebCore::NetworkStorageSession::storageSession(sessionID()); > ASSERT(networkStorageSession); > >- logCookieInformation("NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier()); >+ logCookieInformation(m_connection, "NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier()); > } > >-static void logBlockedCookieInformation(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) >+static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) > { >- ASSERT(NetworkResourceLoader::shouldLogCookieInformation(networkStorageSession.sessionID())); >+ ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); > > auto escapedURL = escapeForJSON(url.string()); > auto escapedFirstParty = escapeForJSON(firstParty.string()); >@@ -1003,9 +1002,9 @@ static void logBlockedCookieInformation( > #undef LOCAL_LOG_IF_ALLOWED > } > >-static void logCookieInformationInternal(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) >+static void logCookieInformationInternal(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) > { >- ASSERT(NetworkResourceLoader::shouldLogCookieInformation(networkStorageSession.sessionID())); >+ ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); > > Vector<WebCore::Cookie> cookies; > if (!networkStorageSession.getRawCookies(firstParty, sameSiteInfo, url, frameID, pageID, cookies)) >@@ -1064,14 +1063,14 @@ static void logCookieInformationInternal > #undef LOCAL_LOG_IF_ALLOWED > } > >-void NetworkResourceLoader::logCookieInformation(const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) >+void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) > { >- ASSERT(shouldLogCookieInformation(networkStorageSession.sessionID())); >+ ASSERT(shouldLogCookieInformation(connection, networkStorageSession.sessionID())); > > if (networkStorageSession.shouldBlockCookies(firstParty, url, frameID, pageID)) >- logBlockedCookieInformation(label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier); >+ logBlockedCookieInformation(connection, label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier); > else >- logCookieInformationInternal(label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier); >+ logCookieInformationInternal(connection, label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier); > } > #endif > >Index: Source/WebKit/NetworkProcess/NetworkResourceLoader.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkResourceLoader.h (revision 239762) >+++ Source/WebKit/NetworkProcess/NetworkResourceLoader.h (working copy) >@@ -109,8 +109,8 @@ public: > bool isAlwaysOnLoggingAllowed() const; > > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >- static bool shouldLogCookieInformation(const PAL::SessionID&); >- static void logCookieInformation(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier); >+ static bool shouldLogCookieInformation(NetworkConnectionToWebProcess&, const PAL::SessionID&); >+ static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier); > #endif > > private: >Index: Source/WebKit/NetworkProcess/PingLoad.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/PingLoad.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/PingLoad.cpp (working copy) >@@ -30,7 +30,7 @@ > #include "AuthenticationManager.h" > #include "Logging.h" > #include "NetworkLoadChecker.h" >-#include "SessionTracker.h" >+#include "NetworkProcess.h" > #include "WebErrors.h" > > #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_parameters.sessionID.isAlwaysOnLoggingAllowed(), Network, "%p - PingLoad::" fmt, this, ##__VA_ARGS__) >@@ -56,7 +56,7 @@ PingLoad::PingLoad(NetworkProcess& netwo > // Set a very generous timeout, just in case. > m_timeoutTimer.startOneShot(60000_s); > >- m_networkLoadChecker->check(ResourceRequest { m_parameters.request }, nullptr, [this] (auto&& result) { >+ m_networkLoadChecker->check(ResourceRequest { m_parameters.request }, nullptr, [this, networkProcess = makeRef(networkProcess)] (auto&& result) { > WTF::switchOn(result, > [this] (ResourceError& error) { > this->didFinish(error); >@@ -65,8 +65,8 @@ PingLoad::PingLoad(NetworkProcess& netwo > // We should never send a synthetic redirect for PingLoads. > ASSERT_NOT_REACHED(); > }, >- [this] (ResourceRequest& request) { >- this->loadRequest(WTFMove(request)); >+ [&] (ResourceRequest& request) { >+ this->loadRequest(networkProcess, WTFMove(request)); > } > ); > }); >@@ -87,10 +87,10 @@ void PingLoad::didFinish(const ResourceE > delete this; > } > >-void PingLoad::loadRequest(ResourceRequest&& request) >+void PingLoad::loadRequest(NetworkProcess& networkProcess, ResourceRequest&& request) > { > RELEASE_LOG_IF_ALLOWED("startNetworkLoad"); >- if (auto* networkSession = SessionTracker::networkSession(m_parameters.sessionID)) { >+ if (auto* networkSession = networkProcess.networkSession(m_parameters.sessionID)) { > auto loadParameters = m_parameters; > loadParameters.request = WTFMove(request); > m_task = NetworkDataTask::create(*networkSession, *this, WTFMove(loadParameters)); >Index: Source/WebKit/NetworkProcess/PingLoad.h >=================================================================== >--- Source/WebKit/NetworkProcess/PingLoad.h (revision 239762) >+++ Source/WebKit/NetworkProcess/PingLoad.h (working copy) >@@ -57,7 +57,7 @@ private: > void cannotShowURL() final; > void timeoutTimerFired(); > >- void loadRequest(WebCore::ResourceRequest&&); >+ void loadRequest(NetworkProcess&, WebCore::ResourceRequest&&); > > void didFinish(const WebCore::ResourceError& = { }, const WebCore::ResourceResponse& response = { }); > >Index: Source/WebKit/NetworkProcess/PreconnectTask.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/PreconnectTask.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/PreconnectTask.cpp (working copy) >@@ -32,7 +32,6 @@ > #include "NetworkLoad.h" > #include "NetworkLoadParameters.h" > #include "NetworkProcess.h" >-#include "SessionTracker.h" > #include "WebErrors.h" > #include <WebCore/ResourceError.h> > >@@ -40,13 +39,13 @@ namespace WebKit { > > using namespace WebCore; > >-PreconnectTask::PreconnectTask(NetworkLoadParameters&& parameters, CompletionHandler<void(const ResourceError&)>&& completionHandler) >+PreconnectTask::PreconnectTask(NetworkProcess& networkProcess, NetworkLoadParameters&& parameters, CompletionHandler<void(const ResourceError&)>&& completionHandler) > : m_completionHandler(WTFMove(completionHandler)) > , m_timeoutTimer([this] { didFinish(ResourceError { String(), 0, m_networkLoad->parameters().request.url(), "Preconnection timed out"_s, ResourceError::Type::Timeout }); }) > { > RELEASE_LOG(Network, "%p - PreconnectTask::PreconnectTask()", this); > >- auto* networkSession = SessionTracker::networkSession(parameters.sessionID); >+ auto* networkSession = networkProcess.networkSession(parameters.sessionID); > if (!networkSession) { > ASSERT_NOT_REACHED(); > m_completionHandler(internalError(parameters.request.url())); >Index: Source/WebKit/NetworkProcess/PreconnectTask.h >=================================================================== >--- Source/WebKit/NetworkProcess/PreconnectTask.h (revision 239762) >+++ Source/WebKit/NetworkProcess/PreconnectTask.h (working copy) >@@ -36,10 +36,11 @@ namespace WebKit { > > class NetworkLoad; > class NetworkLoadParameters; >+class NetworkProcess; > > class PreconnectTask final : public NetworkLoadClient { > public: >- explicit PreconnectTask(NetworkLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&)>&& completionHandler = { }); >+ explicit PreconnectTask(NetworkProcess&, NetworkLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&)>&& completionHandler = { }); > ~PreconnectTask(); > > private: >Index: Source/WebKit/NetworkProcess/RemoteNetworkingContext.h >=================================================================== >--- Source/WebKit/NetworkProcess/RemoteNetworkingContext.h (revision 239762) >+++ Source/WebKit/NetworkProcess/RemoteNetworkingContext.h (working copy) >@@ -35,7 +35,7 @@ struct WebsiteDataStoreParameters; > > class RemoteNetworkingContext { > public: >- // FIXME: Remove platform-specific code and use SessionTracker. >+ // FIXME: Remove platform-specific code. > static void ensureWebsiteDataStoreSession(NetworkProcess&, WebsiteDataStoreParameters&&); > }; > >Index: Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp (working copy) >@@ -31,7 +31,6 @@ > #include "NetworkLoad.h" > #include "NetworkSession.h" > #include "PendingDownload.h" >-#include "SessionTracker.h" > #include <WebCore/NotImplemented.h> > #include <pal/SessionID.h> > #include <wtf/StdLibExtras.h> >@@ -46,7 +45,7 @@ DownloadManager::DownloadManager(Client& > > void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName) > { >- auto* networkSession = SessionTracker::networkSession(sessionID); >+ auto* networkSession = client().networkSession(sessionID); > if (!networkSession) > return; > >Index: Source/WebKit/NetworkProcess/Downloads/DownloadManager.h >=================================================================== >--- Source/WebKit/NetworkProcess/Downloads/DownloadManager.h (revision 239762) >+++ Source/WebKit/NetworkProcess/Downloads/DownloadManager.h (working copy) >@@ -72,6 +72,7 @@ public: > virtual IPC::Connection* parentProcessConnectionForDownloads() = 0; > virtual AuthenticationManager& downloadsAuthenticationManager() = 0; > virtual void pendingDownloadCanceled(DownloadID) = 0; >+ virtual NetworkSession* networkSession(const PAL::SessionID&) = 0; > virtual void ref() const = 0; > virtual void deref() const = 0; > }; >Index: Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm (revision 239762) >+++ Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm (working copy) >@@ -28,7 +28,6 @@ > > #import "DataReference.h" > #import "NetworkSessionCocoa.h" >-#import "SessionTracker.h" > #import "WKDownloadProgress.h" > #import <pal/spi/cf/CFNetworkSPI.h> > #import <pal/spi/cocoa/NSProgressSPI.h> >@@ -41,7 +40,7 @@ void Download::resume(const IPC::DataRef > if (m_sandboxExtension) > m_sandboxExtension->consume(); > >- auto* networkSession = SessionTracker::networkSession(m_sessionID); >+ auto* networkSession = m_downloadManager.client().networkSession(m_sessionID); > if (!networkSession) { > WTFLogAlways("Could not find network session with given session ID"); > return; >Index: Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp (working copy) >@@ -31,8 +31,8 @@ > #include "Logging.h" > #include "NetworkCache.h" > #include "NetworkLoad.h" >+#include "NetworkProcess.h" > #include "NetworkSession.h" >-#include "SessionTracker.h" > #include <WebCore/NetworkStorageSession.h> > #include <pal/SessionID.h> > #include <wtf/RunLoop.h> >@@ -60,7 +60,7 @@ SpeculativeLoad::SpeculativeLoad(Cache& > parameters.contentSniffingPolicy = ContentSniffingPolicy::DoNotSniffContent; > parameters.contentEncodingSniffingPolicy = ContentEncodingSniffingPolicy::Sniff; > parameters.request = m_originalRequest; >- m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *SessionTracker::networkSession(PAL::SessionID::defaultSessionID())); >+ m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *cache.networkProcess().networkSession(PAL::SessionID::defaultSessionID())); > } > > SpeculativeLoad::~SpeculativeLoad() >Index: Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (revision 239762) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (working copy) >@@ -34,7 +34,6 @@ > #import "NetworkProcess.h" > #import "NetworkProximityManager.h" > #import "NetworkSessionCocoa.h" >-#import "SessionTracker.h" > #import "WebCoreArgumentCoders.h" > #import <WebCore/AuthenticationChallenge.h> > #import <WebCore/FileSystem.h> >Index: Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (revision 239762) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (working copy) >@@ -34,7 +34,6 @@ > #import "NetworkResourceLoader.h" > #import "NetworkSessionCocoa.h" > #import "SandboxExtension.h" >-#import "SessionTracker.h" > #import <WebCore/NetworkStorageSession.h> > #import <WebCore/PublicSuffix.h> > #import <WebCore/ResourceRequestCFNet.h> >Index: Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (revision 239762) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (working copy) >@@ -35,7 +35,6 @@ > #import "NetworkLoad.h" > #import "NetworkProcess.h" > #import "NetworkSessionCreationParameters.h" >-#import "SessionTracker.h" > #import <Foundation/NSURLSession.h> > #import <WebCore/Credential.h> > #import <WebCore/FormDataStreamMac.h> >Index: Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp (working copy) >@@ -26,8 +26,8 @@ > #include "config.h" > #include "RemoteNetworkingContext.h" > >+#include "NetworkProcess.h" > #include "NetworkSession.h" >-#include "SessionTracker.h" > #include "WebsiteDataStoreParameters.h" > #include <WebCore/NetworkStorageSession.h> > >@@ -42,7 +42,7 @@ void RemoteNetworkingContext::ensureWebs > return; > > NetworkStorageSession::ensureSession(sessionID, String::number(sessionID.sessionID())); >- SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); >+ networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); > } > > } >Index: Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm >=================================================================== >--- Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (revision 239762) >+++ Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (working copy) >@@ -31,7 +31,6 @@ > #import "NetworkProcess.h" > #import "NetworkSession.h" > #import "NetworkSessionCreationParameters.h" >-#import "SessionTracker.h" > #import "WebErrors.h" > #import "WebsiteDataStoreParameters.h" > #import <WebCore/NetworkStorageSession.h> >@@ -65,7 +64,7 @@ void RemoteNetworkingContext::ensureWebs > for (const auto& cookie : parameters.pendingCookies) > session->setCookie(cookie); > >- SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); >+ networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); > } > > } >Index: Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (revision 239762) >+++ Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (working copy) >@@ -29,7 +29,6 @@ > #include "RemoteNetworkingContext.h" > > #include "NetworkSession.h" >-#include "SessionTracker.h" > #include "WebsiteDataStoreParameters.h" > #include <WebCore/NetworkStorageSession.h> > >@@ -43,7 +42,7 @@ void RemoteNetworkingContext::ensureWebs > return; > > NetworkStorageSession::ensureSession(sessionID, String::number(sessionID.sessionID())); >- SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); >+ networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); > } > > } >Index: Source/WebKit/Shared/SessionTracker.cpp >=================================================================== >--- Source/WebKit/Shared/SessionTracker.cpp (revision 239762) >+++ Source/WebKit/Shared/SessionTracker.cpp (nonexistent) >@@ -1,64 +0,0 @@ >-/* >- * Copyright (C) 2014 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "SessionTracker.h" >- >-#include "NetworkSession.h" >-#include <WebCore/NetworkStorageSession.h> >-#include <wtf/NeverDestroyed.h> >-#include <wtf/RunLoop.h> >- >-namespace WebKit { >-using namespace WebCore; >- >-static HashMap<PAL::SessionID, RefPtr<NetworkSession>>& staticSessionMap() >-{ >- ASSERT(RunLoop::isMain()); >- >- static NeverDestroyed<HashMap<PAL::SessionID, RefPtr<NetworkSession>>> map; >- return map; >-} >- >-NetworkSession* SessionTracker::networkSession(PAL::SessionID sessionID) >-{ >- return staticSessionMap().get(sessionID); >-} >- >-void SessionTracker::setSession(PAL::SessionID sessionID, Ref<NetworkSession>&& session) >-{ >- staticSessionMap().set(sessionID, WTFMove(session)); >-} >- >-void SessionTracker::destroySession(PAL::SessionID sessionID) >-{ >- ASSERT(RunLoop::isMain()); >- auto session = staticSessionMap().take(sessionID); >- if (session) >- session->invalidateAndCancel(); >- NetworkStorageSession::destroySession(sessionID); >-} >- >-} // namespace WebKit >Index: Source/WebKit/Shared/SessionTracker.h >=================================================================== >--- Source/WebKit/Shared/SessionTracker.h (revision 239762) >+++ Source/WebKit/Shared/SessionTracker.h (nonexistent) >@@ -1,52 +0,0 @@ >-/* >- * Copyright (C) 2014 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef SessionTracker_h >-#define SessionTracker_h >- >-namespace WebCore { >-class NetworkStorageSession; >-} >- >-#include <pal/SessionID.h> >-#include <wtf/HashMap.h> >-#include <wtf/Noncopyable.h> >-#include <wtf/text/WTFString.h> >- >-namespace WebKit { >- >-class NetworkSession; >- >-class SessionTracker { >- WTF_MAKE_NONCOPYABLE(SessionTracker); >-public: >- static void setSession(PAL::SessionID, Ref<NetworkSession>&&); >- static NetworkSession* networkSession(PAL::SessionID); >- static void destroySession(PAL::SessionID); >-}; >- >-} // namespace WebKit >- >-#endif // SessionTracker_h >Index: Source/WebKit/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 239762) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -1088,7 +1088,6 @@ > 6BE969CD1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE969CC1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h */; }; > 6EE849C81368D9390038D481 /* WKInspectorPrivateMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 728E86F11795188C0087879E /* WebColorPickerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 728E86EF1795188C0087879E /* WebColorPickerMac.h */; }; >- 753E3E0E1887398900188496 /* SessionTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 753E3E091887394B00188496 /* SessionTracker.h */; }; > 75A8D2C8187CCFAB00C39C9E /* WKWebsiteDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */; settings = {ATTRIBUTES = (Public, ); }; }; > 75A8D2D6187D1C0E00C39C9E /* WKWebsiteDataStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */; }; > 762B748D120BC75C00819339 /* WKPreferencesRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 762B7484120BBA2D00819339 /* WKPreferencesRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -3514,8 +3513,6 @@ > 6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKInspectorPrivateMac.h; path = mac/WKInspectorPrivateMac.h; sourceTree = "<group>"; }; > 728E86EF1795188C0087879E /* WebColorPickerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerMac.h; sourceTree = "<group>"; }; > 728E86F01795188C0087879E /* WebColorPickerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebColorPickerMac.mm; sourceTree = "<group>"; }; >- 753E3E091887394B00188496 /* SessionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionTracker.h; sourceTree = "<group>"; }; >- 753E3E0B1887397300188496 /* SessionTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionTracker.cpp; sourceTree = "<group>"; }; > 75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStore.h; sourceTree = "<group>"; }; > 75A8D2C5187CCF9F00C39C9E /* WKWebsiteDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebsiteDataStore.mm; sourceTree = "<group>"; }; > 75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStoreInternal.h; sourceTree = "<group>"; }; >@@ -5069,8 +5066,6 @@ > E1E552C316AE065E004ED653 /* SandboxInitializationParameters.h */, > 1AFDE6571954A42B00C48FFA /* SessionState.cpp */, > 1AFDE6581954A42B00C48FFA /* SessionState.h */, >- 753E3E0B1887397300188496 /* SessionTracker.cpp */, >- 753E3E091887394B00188496 /* SessionTracker.h */, > 1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */, > 1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */, > 5121745E164C20E30037A5C1 /* ShareableResource.cpp */, >@@ -9296,7 +9291,6 @@ > 414DEDD71F9EDDE50047C40D /* ServiceWorkerProcessProxy.h in Headers */, > 1AFDE65A1954A42B00C48FFA /* SessionState.h in Headers */, > 1A002D49196B345D00B9AD44 /* SessionStateCoding.h in Headers */, >- 753E3E0E1887398900188496 /* SessionTracker.h in Headers */, > 1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */, > 51217461164C20E30037A5C1 /* ShareableResource.h in Headers */, > 1A24BED5120894D100FBB059 /* SharedMemory.h in Headers */, >Index: Source/WebKit/WebProcess/WebProcess.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.cpp (revision 239762) >+++ Source/WebKit/WebProcess/WebProcess.cpp (working copy) >@@ -41,7 +41,6 @@ > #include "NetworkSession.h" > #include "NetworkSessionCreationParameters.h" > #include "PluginProcessConnectionManager.h" >-#include "SessionTracker.h" > #include "StatisticsData.h" > #include "UserData.h" > #include "WebAutomationSessionProxy.h" >@@ -542,6 +541,11 @@ void WebProcess::ensureLegacyPrivateBrow > ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::EnsureLegacyPrivateBrowsingSession(), 0); > } > >+void WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess() >+{ >+ ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::DestroyLegacyPrivateBrowsingSession(), 0); >+} >+ > #if ENABLE(NETSCAPE_PLUGIN_API) > PluginProcessConnectionManager& WebProcess::pluginProcessConnectionManager() > { >Index: Source/WebKit/WebProcess/WebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.h (revision 239762) >+++ Source/WebKit/WebProcess/WebProcess.h (working copy) >@@ -178,6 +178,7 @@ public: > void setCacheModel(CacheModel); > > void ensureLegacyPrivateBrowsingSessionInNetworkProcess(); >+ void destroyLegacyPrivateBrowsingSessionInNetworkProcess(); > > void pageDidEnterWindow(uint64_t pageID); > void pageWillLeaveWindow(uint64_t pageID); >Index: Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (revision 239762) >+++ Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (working copy) >@@ -33,7 +33,6 @@ > #include "NetworkProcessConnection.h" > #include "NetworkSessionCreationParameters.h" > #include "NotificationPermissionRequestManager.h" >-#include "SessionTracker.h" > #include "UserData.h" > #include "WebConnectionToUIProcess.h" > #include "WebCoreArgumentCoders.h" >@@ -355,10 +354,10 @@ void InjectedBundle::setJavaScriptCanAcc > void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, bool enabled) > { > ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); >- if (enabled) { >+ if (enabled) > WebProcess::singleton().ensureLegacyPrivateBrowsingSessionInNetworkProcess(); >- } else >- SessionTracker::destroySession(PAL::SessionID::legacyPrivateSessionID()); >+ else >+ WebProcess::singleton().destroyLegacyPrivateBrowsingSessionInNetworkProcess(); > > const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages(); > for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter) >Index: Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >=================================================================== >--- Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (revision 239762) >+++ Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (working copy) >@@ -32,7 +32,6 @@ > #include "NetworkConnectionToWebProcessMessages.h" > #include "NetworkProcessConnection.h" > #include "NetworkResourceLoadParameters.h" >-#include "SessionTracker.h" > #include "SharedBufferDataReference.h" > #include "WebCompiledContentRuleList.h" > #include "WebCoreArgumentCoders.h" >Index: Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (revision 239762) >+++ Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (working copy) >@@ -34,7 +34,6 @@ > #include "NetworkProcessConnection.h" > #include "NetworkResourceLoadParameters.h" > #include "PluginInfoStore.h" >-#include "SessionTracker.h" > #include "WebCoreArgumentCoders.h" > #include "WebErrors.h" > #include "WebFrame.h" >Index: Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp (revision 239762) >+++ Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp (working copy) >@@ -27,7 +27,6 @@ > #include "WebFrameNetworkingContext.h" > > #include "NetworkSession.h" >-#include "SessionTracker.h" > #include "WebFrame.h" > #include "WebPage.h" > #include "WebsiteDataStoreParameters.h" >Index: Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (revision 239762) >+++ Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (working copy) >@@ -40,7 +40,7 @@ public: > return adoptRef(*new WebFrameNetworkingContext(frame)); > } > >- // FIXME: remove platform-specific code and use SessionTracker >+ // FIXME: remove platform-specific code. > static void ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&&); > > WebFrameLoaderClient* webFrameLoaderClient() const; >Index: Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (revision 239762) >+++ Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (working copy) >@@ -27,7 +27,6 @@ > #include "WebFrameNetworkingContext.h" > > #include "NetworkSession.h" >-#include "SessionTracker.h" > #include "WebPage.h" > #include "WebProcess.h" > #include "WebsiteDataStoreParameters.h" >Index: Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp (revision 239762) >+++ Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp (working copy) >@@ -29,7 +29,6 @@ > > #include "NetworkSession.h" > #include "NetworkSessionCreationParameters.h" >-#include "SessionTracker.h" > #include "WebFrame.h" > #include "WebPage.h" > #include "WebsiteDataStoreParameters.h" >Index: Source/WebKit/WebProcess/WebPage/WebPage.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.cpp (revision 239762) >+++ Source/WebKit/WebProcess/WebPage/WebPage.cpp (working copy) >@@ -58,7 +58,6 @@ > #include "RemoteWebInspectorUIMessages.h" > #include "SessionState.h" > #include "SessionStateConversion.h" >-#include "SessionTracker.h" > #include "ShareSheetCallbackID.h" > #include "ShareableBitmap.h" > #include "SharedBufferDataReference.h" >Index: Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >=================================================================== >--- Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (revision 239762) >+++ Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (working copy) >@@ -33,7 +33,6 @@ > #import "ObjCObjectGraph.h" > #import "SandboxExtension.h" > #import "SandboxInitializationParameters.h" >-#import "SessionTracker.h" > #import "WKAPICast.h" > #import "WKBrowsingContextHandleInternal.h" > #import "WKCrashReporter.h"
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
Flags:
joepeck
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193266
:
358652
|
358659
|
358664
|
358672
|
358675
| 358720