Skip to content

Commit

Permalink
Do not create blob temp folder for ephemeral sessions
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=257950
rdar://110545873

Reviewed by Sihui Liu.

We are creating a temp folder for blobs to use mapped memory to store blobs, as a way to limit networking process jetsams.
This creation was not dependent on session being ephemeral or not.
We are now skipping the creation of this temp folder for ephemeral sessions.
This will trigger use of regular memory for storing blobs, which may increase networking process jetsams.

* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

Canonical link: https://commits.webkit.org/265127@main
  • Loading branch information
youennf committed Jun 13, 2023
1 parent a40e16f commit e3e5b70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Expand Up @@ -1403,7 +1403,8 @@ static void activateSessionCleanup(NetworkSessionCocoa& session, const NetworkSe

NSURLSessionConfiguration *configuration = configurationForSessionID(m_sessionID, isParentProcessAFullWebBrowser(networkProcess));

m_blobRegistry.setFileDirectory(FileSystem::createTemporaryDirectory(@"BlobRegistryFiles"));
if (!m_sessionID.isEphemeral())
m_blobRegistry.setFileDirectory(FileSystem::createTemporaryDirectory(@"BlobRegistryFiles"));

if (!!parameters.hstsStorageDirectory && !m_sessionID.isEphemeral()) {
SandboxExtension::consumePermanently(parameters.hstsStorageDirectoryExtensionHandle);
Expand Down

0 comments on commit e3e5b70

Please sign in to comment.