From 43bf6df2bb369156630ada5b258c191a73786e1a Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 8 Apr 2022 13:25:59 -0700 Subject: [PATCH] browser(webkit): separate local storage dirs for different contexts (#13436) --- browser_patches/webkit/BUILD_NUMBER | 4 ++-- browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER index 5057df1949..c17fb8c93d 100644 --- a/browser_patches/webkit/BUILD_NUMBER +++ b/browser_patches/webkit/BUILD_NUMBER @@ -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 diff --git a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m index 171c3093b8..d4ec183fb2 100644 --- a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m +++ b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m @@ -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];