WebKit Bugzilla
Attachment 362122 Details for
Bug 194709
: IndexedDB: IDBDatabase and IDBTransaction are leaked in layout tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194709-20190215101216.patch (text/plain), 3.33 KB, created by
Sihui Liu
on 2019-02-15 10:12:17 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2019-02-15 10:12:17 PST
Size:
3.33 KB
patch
obsolete
>Subversion Revision: 241453 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 22adac6207dfa3690eae59a963fa1db62847e746..679b17f6d2f95bd1e3a24126aab1b8f8e873ad93 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-02-15 Sihui Liu <sihui_liu@apple.com> >+ >+ IndexedDB: leak IDBDatabase and IDBTransacstion in layout tests >+ https://bugs.webkit.org/show_bug.cgi?id=194709 >+ <rdar://problem/47769777> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When connection to IDB server is closed, IDBTransaction would abort without notifying IDBDatabase, so >+ IDBDatabase didn't clear its reference to IDBTransaction which created a reference cycle. >+ Also IDBTransaction didn't clear its reference to IDBRequest in this case and it led to another reference >+ cycle between IDBOpenDBRequest and IDBTransaction. >+ >+ * Modules/indexeddb/IDBDatabase.cpp: >+ (WebCore::IDBDatabase::connectionToServerLost): >+ * Modules/indexeddb/IDBTransaction.cpp: >+ (WebCore::IDBTransaction::connectionClosedFromServer): >+ > 2019-02-13 John Wilander <wilander@apple.com> > > Store Ad Click Attribution requests in the network process >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >index 1847439190a8b79bef706432fd2f9d7556907365..0a095725fd2fbd324b957118924149eba26364e7 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >@@ -264,7 +264,8 @@ void IDBDatabase::connectionToServerLost(const IDBError& error) > m_closePending = true; > m_closedInServer = true; > >- for (auto& transaction : m_activeTransactions.values()) >+ auto transactions = copyToVector(m_activeTransactions.values()); >+ for (auto& transaction : transactions) > transaction->connectionClosedFromServer(error); > > auto errorEvent = Event::create(m_eventNames.errorEvent, Event::CanBubble::Yes, Event::IsCancelable::No); >diff --git a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >index 2e965e97d2909ec0c70f3f8741a188ff6c549b2f..f944a8c78212db5e202a64eaffe6f04d9916214f 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >@@ -1434,7 +1434,8 @@ void IDBTransaction::connectionClosedFromServer(const IDBError& error) > { > LOG(IndexedDB, "IDBTransaction::connectionClosedFromServer - %s", error.message().utf8().data()); > >- m_state = IndexedDB::TransactionState::Aborting; >+ m_database->willAbortTransaction(*this); >+ transitionedToFinishing(IndexedDB::TransactionState::Aborting); > > abortInProgressOperations(error); > >@@ -1445,6 +1446,7 @@ void IDBTransaction::connectionClosedFromServer(const IDBError& error) > ASSERT(m_transactionOperationsInProgressQueue.first() == operation.get()); > operation->doComplete(IDBResultData::error(operation->identifier(), error)); > } >+ m_currentlyCompletingRequest = nullptr; > > connectionProxy().forgetActiveOperations(operations); > >@@ -1454,6 +1456,7 @@ void IDBTransaction::connectionClosedFromServer(const IDBError& error) > > m_idbError = error; > m_domError = error.toDOMException(); >+ m_database->didAbortTransaction(*this); > fireOnAbort(); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194709
:
362122
|
362196
|
362300
|
362332
|
362346
|
362353
|
362356
|
362504
|
362509
|
362516
|
362517
|
362773