| Summary: | Don't create directories on iOS if we are only using ephemeral storages | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||
| Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, ddkilzer, sihui_liu, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Alex Christensen
2022-03-25 19:02:24 PDT
Created attachment 455813 [details]
Patch
Looks like iOS failures may be real? Comment on attachment 455813 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455813&action=review > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:334 > + if (!process.sessionID().isEphemeral()) { This was asserting because when we initialize the web process we don't always have a session ID yet. I'm moving this to WebProcess::setWebsiteDataStoreParameters Created attachment 455929 [details]
Patch
Comment on attachment 455929 [details]
Patch
r=me assuming the bots are happy.
Comment on attachment 455929 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455929&action=review > Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:290 > + m_cookieStorageDirectory = resolveAndCreateReadWriteDirectoryForSandboxExtension(WebProcessPool::cookieStorageDirectory()); It's a bit weird that WebsiteDataStore asks WebProcessPool for directory. I If we think the directory is per WebsiteDataStore, maybe we should move cookieStorageDirectory() to WebsiteDataStore? If we don't think it's per WebsiteDataStore, maybe we should not send it in WebsiteDataStoreParameters? > Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1905 > + if (String cookieStorageDirectory = WebProcessPool::cookieStorageDirectory(); !cookieStorageDirectory.isEmpty()) If we already call resolveDirectoriesIfNecessary() above, shouldn't we just check if (!m_cookieStorageDirectory.isEmpty())? This is indeed weird code that is quite old so I'm trying to minimize functional changes. It is taking another step in its transition from process pool to data store. (by the way, I agree with Sihui's cleanup suggestions and think they should be done, but not right now) |