Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9035d2c04f376fd2238a730666d336d9099a0901
https://github.com/WebKit/WebKit/commit/9035d2c04f376fd2238a730666d336d9099a0901
Author: Chris Dumez <[email protected]>
Date: 2026-01-14 (Wed, 14 Jan 2026)
Changed paths:
M Source/WebCore/platform/sql/SQLiteExtras.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm
Log Message:
-----------
New-Test(302373@main): ASSERTION FAILED: !(blobSize % sizeof(T)) on
TestWebKitAPI.IndexedDB.OpenDatabaseWithMismatchedMetadataVersionAndName
https://bugs.webkit.org/show_bug.cgi?id=301776
rdar://163819252
Reviewed by Sihui Liu.
The test case is covering a case where the user has an IDB database whose
IDB version is 2 but is still using the old encoding for Strings (due to
a bug we had in WebKit for a while). In this case, it tries to read the
database name string in the new format and gets "garbage" and then later
compared it with the expected name and if it doesn't match, there is logic
to handle the migration. The issue is that there is a debug assertion in
sqliteColumnBlob() which hits in debug when trying to read the database
name in the new format (which doesn't match the format on disk). Since
this is expected in this case, I am replacing the debug assertion with
an `if` check which returns an empty span in this case (which is strictly
better than returning "garbage") and it will keep the database upgrade
logic working as intended.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm
* Source/WebCore/platform/sql/SQLiteExtras.h:
(WebCore::sqliteColumnBlob):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm:
(TEST(IndexedDB, OpenDatabaseWithMismatchedMetadataVersionAndName)):
Canonical link: https://commits.webkit.org/305603@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications