browser(webkit): separate local storage dirs for different contexts (#13436)

This commit is contained in:
Yury Semikhatsky 2022-04-08 13:25:59 -07:00 committed by GitHub
parent 1af32e400f
commit 43bf6df2bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,2 +1,2 @@
1629
Changed: dkolesa@igalia.com Thu Apr 7 19:06:52 CEST 2022
1630
Changed: yurys@chromium.org Fri 08 Apr 2022 01:14:10 PM PDT

View File

@ -179,6 +179,9 @@ const NSActivityOptions ActivityOptions =
if (!dataStore) {
_WKWebsiteDataStoreConfiguration *configuration = [[[_WKWebsiteDataStoreConfiguration alloc] init] autorelease];
if (_userDataDir) {
// Local storage state should be stored in separate dirs for persistent contexts.
[configuration setShouldUseCustomStoragePaths:YES];
NSURL *cookieFile = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/cookie.db", _userDataDir]];
[configuration _setCookieStorageFile:cookieFile];