Skip to content
Permalink
Browse files
Lambda in UniqueIDBDatabaseConnection::abortTransactionWithoutCallbac…
…k should check weakThis before using this

https://bugs.webkit.org/show_bug.cgi?id=241557

Reviewed by Youenn Fablet.

* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):

Canonical link: https://commits.webkit.org/251506@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
achristensen07 committed Jun 13, 2022
1 parent 7dec0b8 commit 53f736ff29282ff919cdf981b81c22294a9b030e
Showing 1 changed file with 3 additions and 1 deletion.
@@ -79,7 +79,9 @@ void UniqueIDBDatabaseConnection::abortTransactionWithoutCallback(UniqueIDBDatab
ASSERT(m_database);

const auto& transactionIdentifier = transaction.info().identifier();
m_database->abortTransaction(transaction, [this, transactionIdentifier](const IDBError&) {
m_database->abortTransaction(transaction, [this, weakThis = WeakPtr { *this }, transactionIdentifier](const IDBError&) {
if (!weakThis)
return;
ASSERT(m_transactionMap.contains(transactionIdentifier));
m_transactionMap.remove(transactionIdentifier);
});

0 comments on commit 53f736f

Please sign in to comment.