Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f0a1fd2b322dc912a2ce551c58dfd1c7be4e3571
      
https://github.com/WebKit/WebKit/commit/f0a1fd2b322dc912a2ce551c58dfd1c7be4e3571
  Author: Sihui Liu <[email protected]>
  Date:   2026-08-17 (Mon, 17 Aug 2026)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp
    M Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h
    M Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
    M Tools/WebKitTestRunner/TestController.cpp

  Log Message:
  -----------
  [Site Isolation] WebKitTestRunner leaks isolated site records between tests 
and across runs
https://bugs.webkit.org/show_bug.cgi?id=321817
rdar://184954498

Reviewed by Ryosuke Niwa.

configureWebsiteDataStoreTemporaryDirectories() redirects every website data 
directory WebKitTestRunner uses into its
temporary folder, but isolatedSitesDirectory was missing from that list, so it 
resolved to the real per-bundle path and
isolated site records are shared across runs. Records also survived between 
tests within a run, since
resetStateToConsistentValues() had nothing that cleared them.

Fixing these by redirecting the directory, and adding 
WebsiteDataType::IsolatedSiteRecord to the set
WKWebsiteDataStoreClearStorage() removes. Removal routes through 
IsolatedSiteStore::removeAllSites(), which removes site
records but does not clear import-from-ITP flag, so a reset does not cause a 
re-import.

testRunner.clearStorage() now clears these records too, which is what a test 
asking for a clean slate wants, and nothing
depends on them surviving it.

Drive by: give SiteIsolationSharedProcessEnabled defaultsOverridable: true and 
change its status from unstable to
internal, so it can be toggled through NSUserDefaults without a build change 
while it is being brought up. No
user-visible impact - the default value is unchanged, and 
GeneratePreferences.rb treats the two statuses identically.

No new tests: this is test infrastructure, and IsolatedSiteStore's persistence 
and removal behavior is already covered
by the TestWebKitAPI IsolatedSiteStore tests.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:
(WKWebsiteDataStoreConfigurationCopyIsolatedSitesDirectory):
(WKWebsiteDataStoreConfigurationSetIsolatedSitesDirectory):
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h:
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreClearStorage):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):

Canonical link: https://commits.webkit.org/319323@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to