-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 274937@main (f6305e2). https://bugs.webkit.org/show_bug.c…
…gi?id=269648 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. Also update SQLiteStatement / SQLiteTransaction to keep a WeakRef to the database instead of a CheckedRef, as per our updated smart pointer guidelines. Using CheckedPtr/CheckedRef for database members is no longer recommended. * Source/WebCore/platform/sql/SQLiteDatabase.h: * Source/WebCore/platform/sql/SQLiteStatement.h: * Source/WebCore/platform/sql/SQLiteTransaction.h: * Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp: (WebKit::SQLiteStorageArea::handleDatabaseCorruptionIfNeeded): Canonical link: https://commits.webkit.org/274937@main Canonical link: https://commits.webkit.org/274313.39@webkitglib/2.44
- Loading branch information
Showing
4 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters