[webkit-changes] [WebKit/WebKit] 9e9cc9: Crash under SQLiteDatabase::~SQLiteDatabase
Chris Dumez
noreply at github.com
Mon Feb 19 19:25:34 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9e9cc91fdea3d1394f7175c3eae8d09c948a50c4
https://github.com/WebKit/WebKit/commit/9e9cc91fdea3d1394f7175c3eae8d09c948a50c4
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-02-19 (Mon, 19 Feb 2024)
Changed paths:
M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp
Log Message:
-----------
Crash under SQLiteDatabase::~SQLiteDatabase
https://bugs.webkit.org/show_bug.cgi?id=269648
rdar://123160407
Reviewed by David Kilzer.
The crash was occurring because SQLiteStorageArea::handleDatabaseCorruptionIfNeeded()
was destroying the SQLiteDatabase object (m_database) but was failing to destroy the
potential transaction (m_transaction) and cached statements (m_cachedStatements), all
of which have a CheckedRef pointing to the database.
Update handleDatabaseCorruptionIfNeeded() to call close(), which clears m_cache,
m_cacheSize, m_transaction, m_cachedStatements and m_database.
* Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp:
(WebKit::SQLiteStorageArea::handleDatabaseCorruptionIfNeeded):
Canonical link: https://commits.webkit.org/275016@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list