Skip to content

REGRESSION(312316@main): [macOS Debug] ASSERTION FAILED: m_customLocalStoragePath.isEmpty() == m_rootPath.isEmpty()#64119

Closed
cdumez wants to merge 1 commit into
WebKit:mainfrom
cdumez:313786_API_test_failure
Closed

REGRESSION(312316@main): [macOS Debug] ASSERTION FAILED: m_customLocalStoragePath.isEmpty() == m_rootPath.isEmpty()#64119
cdumez wants to merge 1 commit into
WebKit:mainfrom
cdumez:313786_API_test_failure

Conversation

@cdumez
Copy link
Copy Markdown
Contributor

@cdumez cdumez commented May 3, 2026

d30f4a7

REGRESSION(312316@main): [macOS Debug] ASSERTION FAILED: m_customLocalStoragePath.isEmpty() == m_rootPath.isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=313786
rdar://175981209

Reviewed by NOBODY (OOPS!).

The assertions in resolvedLocalStoragePath(), resolvedIDBStoragePath(), and
resolvedCacheStoragePath() check that `m_customStoragePath.isEmpty() == m_rootPath.isEmpty()`.

This is wrong when unifiedOriginStorageLevel is None: it is valid to have custom per-type
storage paths without a unified root directory, which is the entire point of
UnifiedOriginStorageLevelNone with individually configured storage paths.

It is unclear why these tests started failing recently and only on EWS bots (not
reproducible locally or on post-commit bots) but I doubt this is caused by 312316@main
since those tests do not involve extensions.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebsiteDataStoreCustomPaths.mm

* Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp:
(WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath):
(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):
(WebKit::OriginStorageManager::StorageBucket::resolvedCacheStoragePath):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebsiteDataStoreCustomPaths.mm:
(TEST(WebKit, WebsiteDataStoreCustomPathsWithoutPrewarming)):
(TEST(WebKit, WebsiteDataStoreCustomPathsWithPrewarming)):

d30f4a7

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ❌ 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

…lStoragePath.isEmpty() == m_rootPath.isEmpty()

https://bugs.webkit.org/show_bug.cgi?id=313786
rdar://175981209

Reviewed by NOBODY (OOPS!).

The assertions in resolvedLocalStoragePath(), resolvedIDBStoragePath(), and
resolvedCacheStoragePath() check that `m_customStoragePath.isEmpty() == m_rootPath.isEmpty()`.

This is wrong when unifiedOriginStorageLevel is None: it is valid to have custom per-type
storage paths without a unified root directory, which is the entire point of
UnifiedOriginStorageLevelNone with individually configured storage paths.

It is unclear why these tests started failing recently and only on EWS bots (not
reproducible locally or on post-commit bots) but I doubt this is caused by 312316@main
since those tests do not involve extensions.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebsiteDataStoreCustomPaths.mm

* Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp:
(WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath):
(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):
(WebKit::OriginStorageManager::StorageBucket::resolvedCacheStoragePath):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebsiteDataStoreCustomPaths.mm:
(TEST(WebKit, WebsiteDataStoreCustomPathsWithoutPrewarming)):
(TEST(WebKit, WebsiteDataStoreCustomPathsWithPrewarming)):
@cdumez cdumez requested a review from rr-codes as a code owner May 3, 2026 02:49
@cdumez cdumez self-assigned this May 3, 2026
@cdumez cdumez added the Website Storage Bugs related to storage APIs, including IndexedDB and localStorage label May 3, 2026
@cdumez cdumez requested a review from szewai May 4, 2026 00:42
Copy link
Copy Markdown
Contributor

@szewai szewai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is wrong to have !m_customLocalStoragePath().isEmpty() with m_rootPath.isEmpty() because when UnifiedOriginStorageLevel is None LocalStorage is stored inside m_customLocalStoragePath, and FileSystem storage is stored inside m_rootPath (FileSystem is introduced after origin directory Is added, so it uses origin directory at all unified levels).
If one of them is empty, it means one type is persisted but the other is not.

@cdumez
Copy link
Copy Markdown
Contributor Author

cdumez commented May 4, 2026

#64202

@cdumez cdumez closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Website Storage Bugs related to storage APIs, including IndexedDB and localStorage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants