Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 931ec1560a9532616482cc4aeb14e00ea2fdf7fe https://github.com/WebKit/WebKit/commit/931ec1560a9532616482cc4aeb14e00ea2fdf7fe Author: Timothy Hatcher <timo...@apple.com> Date: 2025-04-08 (Tue, 08 Apr 2025)
Changed paths: M Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.cpp M Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.h M Source/WebKit/Shared/Extensions/WebExtensionSQLiteHelpers.h M Source/WebKit/Shared/Extensions/WebExtensionSQLiteRow.cpp M Source/WebKit/Shared/Extensions/WebExtensionSQLiteStatement.cpp M Source/WebKit/Shared/Extensions/WebExtensionSQLiteStatement.h M Source/WebKit/Shared/Extensions/WebExtensionSQLiteStore.cpp M Source/WebKit/UIProcess/Extensions/WebExtensionStorageSQLiteStore.cpp M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIStorage.mm Log Message: ----------- Crash under WebExtensionStorageSQLiteStore::getStorageSizeForKeys(). https://webkit.org/b/291224 rdar://146574493 Reviewed by Brian Weinstein. Fix error handling for WebExtensionSQLiteDatabase by properly passing outError as a reference. As-is the error at the call sites were always null, which would cause a null dereference when calling getBytesInUse(). This was the only place where the error value actually mattered. * Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.cpp: (WebExtensionSQLiteDatabase::reportErrorWithCode): (WebExtensionSQLiteDatabase::errorWithSQLiteErrorCode): (WebExtensionSQLiteDatabase::openWithAccessType): * Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.h: * Source/WebKit/Shared/Extensions/WebExtensionSQLiteHelpers.h: (WebKit::SQLiteDatabaseFetch): (WebKit::SQLiteStatementFetchColumnsInTuple): (WebKit::SQLiteDatabaseEnumerate): (WebKit::SQLiteDatabaseEnumerateRows): (WebKit::WBSStatementFetchColumnsInTuple): Deleted. * Source/WebKit/Shared/Extensions/WebExtensionSQLiteRow.cpp: (WebKit::WebExtensionSQLiteRowEnumerator::next): * Source/WebKit/Shared/Extensions/WebExtensionSQLiteStatement.cpp: (WebKit::WebExtensionSQLiteStatement::WebExtensionSQLiteStatement): * Source/WebKit/Shared/Extensions/WebExtensionSQLiteStatement.h: * Source/WebKit/Shared/Extensions/WebExtensionSQLiteStore.cpp: (WebKit::WebExtensionSQLiteStore::openDatabase): * Source/WebKit/UIProcess/Extensions/WebExtensionStorageSQLiteStore.cpp: (WebKit::WebExtensionStorageSQLiteStore::getStorageSizeForKeys): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIStorage.mm: (TestWebKitAPI::TEST(WKWebExtensionAPIStorage, GetBytesInUseWhenEmpty)): Added. Canonical link: https://commits.webkit.org/293409@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes