RESOLVED FIXED 226086
[Cocoa] GPU Process should recognize that pathForProcessContainer() might fail and handle it gracefully
https://bugs.webkit.org/show_bug.cgi?id=226086
Summary [Cocoa] GPU Process should recognize that pathForProcessContainer() might fai...
Brent Fulgham
Reported 2021-05-21 09:22:34 PDT
The various implementations of WebProcessPool::networkingCachesDirectory(), WebProcessPool::webContentCachesDirectory(), etc., recognize that a process might not be containerized (e.g., system daemons that use WebKit) and so have a clean fallback path for that case. The GPU Process does not, and so can fail to get a clean cache directory resulting in file access errors and other problems. We should use the same logic we do in WebContent.
Attachments
Patch (5.50 KB, patch)
2021-05-21 09:48 PDT, Brent Fulgham
ews-feeder: commit-queue-
Patch (5.47 KB, patch)
2021-05-21 10:10 PDT, Brent Fulgham
no flags
Brent Fulgham
Comment 1 2021-05-21 09:30:47 PDT
Brent Fulgham
Comment 2 2021-05-21 09:48:54 PDT
Brent Fulgham
Comment 3 2021-05-21 10:10:58 PDT
Brent Fulgham
Comment 4 2021-05-21 13:11:49 PDT
This patch is compiled out of Mac builds, so landing now that iOS tests are done.
EWS
Comment 5 2021-05-21 13:19:27 PDT
Committed r277879 (238017@main): <https://commits.webkit.org/238017@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429303 [details].
Darin Adler
Comment 6 2021-05-21 14:08:36 PDT
Comment on attachment 429303 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429303&action=review > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:200 > String path = pathForProcessContainer(); > if (path.isEmpty()) > path = NSHomeDirectory(); > > - path = path + "/Library/Cookies"; > + path = path + subpath; > path = stringByResolvingSymlinksInPath(path); > return path; Could improve performance by correctly using makeString. > Source/WebKit/UIProcess/WebProcessPool.h:514 > + static String cacheDirectoryInContainerOrHomeDirectory(const String& subpath); This argument should be ASCIILiteral.
Note You need to log in before you can comment on or make changes to this bug.