WebKit Bugzilla
Attachment 358508 Details for
Bug 193201
: Move identifierBase from SessionTracker to NetworkProcess/WebProcess
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193201-20190107101646.patch (text/plain), 8.06 KB, created by
Alex Christensen
on 2019-01-07 10:16:47 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-07 10:16:47 PST
Size:
8.06 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 239682) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,31 @@ >+2019-01-07 Alex Christensen <achristensen@webkit.org> >+ >+ Move identifierBase from SessionTracker to NetworkProcess/WebProcess >+ https://bugs.webkit.org/show_bug.cgi?id=193201 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No change in behavior. This just reduces process-global state. >+ >+ * NetworkProcess/NetworkProcess.h: >+ (WebKit::NetworkProcess::uiProcessBundleIdentifier const): >+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm: >+ (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): >+ * NetworkProcess/mac/RemoteNetworkingContext.mm: >+ (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): >+ * Shared/SessionTracker.cpp: >+ (WebKit::identifierBase): Deleted. >+ (WebKit::SessionTracker::getIdentifierBase): Deleted. >+ (WebKit::SessionTracker::setIdentifierBase): Deleted. >+ * Shared/SessionTracker.h: >+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: >+ (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): >+ (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier const): >+ * WebProcess/WebProcess.h: >+ (WebKit::WebProcess::uiProcessBundleIdentifier const): >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ (WebKit::WebProcess::platformInitializeWebProcess): >+ > 2019-01-07 Alex Christensen <achristensen@webkit.org> > > Reduce use of NetworkProcess::singleton >Index: Source/WebKit/NetworkProcess/NetworkProcess.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.h (revision 239680) >+++ Source/WebKit/NetworkProcess/NetworkProcess.h (working copy) >@@ -209,6 +209,8 @@ public: > NetworkHTTPSUpgradeChecker& networkHTTPSUpgradeChecker() { return m_networkHTTPSUpgradeChecker; } > #endif > >+ const String& uiProcessBundleIdentifier() const { return m_uiProcessBundleIdentifier; } >+ > private: > NetworkProcess(); > >@@ -351,6 +353,7 @@ private: > bool m_suppressMemoryPressureHandler { false }; > bool m_diskCacheIsDisabledForTesting; > bool m_canHandleHTTPSServerTrustEvaluation; >+ String m_uiProcessBundleIdentifier; > > RefPtr<NetworkCache::Cache> m_cache; > >Index: Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (revision 239680) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (working copy) >@@ -86,7 +86,7 @@ void NetworkProcess::platformInitializeN > > _CFNetworkSetATSContext(parameters.networkATSContext.get()); > >- SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier); >+ m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier; > > #if PLATFORM(IOS_FAMILY) > NetworkSessionCocoa::setCTDataConnectionServiceType(parameters.ctDataConnectionServiceType); >Index: Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm >=================================================================== >--- Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (revision 239680) >+++ Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (working copy) >@@ -48,11 +48,9 @@ void RemoteNetworkingContext::ensureWebs > if (NetworkStorageSession::storageSession(sessionID)) > return; > >- String base; >- if (SessionTracker::getIdentifierBase().isNull()) >+ String base = networkProcess.uiProcessBundleIdentifier(); >+ if (base.isNull()) > base = [[NSBundle mainBundle] bundleIdentifier]; >- else >- base = SessionTracker::getIdentifierBase(); > > if (!sessionID.isEphemeral()) > SandboxExtension::consumePermanently(parameters.cookieStoragePathExtensionHandle); >Index: Source/WebKit/Shared/SessionTracker.cpp >=================================================================== >--- Source/WebKit/Shared/SessionTracker.cpp (revision 239670) >+++ Source/WebKit/Shared/SessionTracker.cpp (working copy) >@@ -34,26 +34,6 @@ > namespace WebKit { > using namespace WebCore; > >-static String& identifierBase() >-{ >- ASSERT(RunLoop::isMain()); >- >- static NeverDestroyed<String> base; >- return base; >-} >- >-const String& SessionTracker::getIdentifierBase() >-{ >- return identifierBase(); >-} >- >-void SessionTracker::setIdentifierBase(const String& identifier) >-{ >- ASSERT(RunLoop::isMain()); >- >- identifierBase() = identifier; >-} >- > static HashMap<PAL::SessionID, RefPtr<NetworkSession>>& staticSessionMap() > { > ASSERT(RunLoop::isMain()); >Index: Source/WebKit/Shared/SessionTracker.h >=================================================================== >--- Source/WebKit/Shared/SessionTracker.h (revision 239670) >+++ Source/WebKit/Shared/SessionTracker.h (working copy) >@@ -42,9 +42,6 @@ class NetworkSession; > class SessionTracker { > WTF_MAKE_NONCOPYABLE(SessionTracker); > public: >- static const String& getIdentifierBase(); >- static void setIdentifierBase(const String&); >- > static void setSession(PAL::SessionID, Ref<NetworkSession>&&); > static NetworkSession* networkSession(PAL::SessionID); > static void destroySession(PAL::SessionID); >Index: Source/WebKit/WebProcess/WebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.h (revision 239671) >+++ Source/WebKit/WebProcess/WebProcess.h (working copy) >@@ -191,6 +191,8 @@ public: > void destroyRenderingResources(); > #endif > >+ const String& uiProcessBundleIdentifier() const { return m_uiProcessBundleIdentifier; } >+ > void updateActivePages(); > void getActivePagesOriginsForTesting(CompletionHandler<void(Vector<String>&&)>&&); > void pageActivityStateDidChange(uint64_t pageID, OptionSet<WebCore::ActivityState::Flag> changed); >@@ -432,6 +434,7 @@ private: > > TextCheckerState m_textCheckerState; > >+ String m_uiProcessBundleIdentifier; > RefPtr<NetworkProcessConnection> m_networkProcessConnection; > WebLoaderStrategy& m_webLoaderStrategy; > >Index: Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (revision 239670) >+++ Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (working copy) >@@ -50,11 +50,9 @@ void WebFrameNetworkingContext::ensureWe > if (NetworkStorageSession::storageSession(sessionID)) > return; > >- String base; >- if (SessionTracker::getIdentifierBase().isNull()) >+ String base = WebProcess::singleton().uiProcessBundleIdentifier(); >+ if (base.isNull()) > base = [[NSBundle mainBundle] bundleIdentifier]; >- else >- base = SessionTracker::getIdentifierBase(); > > NetworkStorageSession::ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID())); > } >@@ -78,7 +76,7 @@ RetainPtr<CFDataRef> WebFrameNetworkingC > > String WebFrameNetworkingContext::sourceApplicationIdentifier() const > { >- return SessionTracker::getIdentifierBase(); >+ return WebProcess::singleton().uiProcessBundleIdentifier(); > } > > ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const >Index: Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >=================================================================== >--- Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (revision 239670) >+++ Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (working copy) >@@ -134,7 +134,7 @@ void WebProcess::platformInitializeWebPr > WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); > WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion); > >- SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier); >+ m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier; > > #if ENABLE(SANDBOX_EXTENSIONS) > SandboxExtension::consumePermanently(parameters.uiProcessBundleResourcePathExtensionHandle);
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:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193201
: 358508