WebKit Bugzilla
Attachment 359249 Details for
Bug 193097
: IndexedDB: leak WebIDBConnectionToClient for retain cycle
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193097-20190115200238.patch (text/plain), 7.18 KB, created by
Sihui Liu
on 2019-01-15 20:02:39 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2019-01-15 20:02:39 PST
Size:
7.18 KB
patch
obsolete
>Subversion Revision: 240023 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3c69442d1802a73ae00b2b2f1c33375fe02fef3d..b296566f2bf73ac18624b3bddfd10737d543dbcd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2019-01-15 Sihui Liu <sihui_liu@apple.com> >+ >+ IndexedDB: leak WebIDBConnectionToClient for retain cycle >+ https://bugs.webkit.org/show_bug.cgi?id=193097 >+ <rdar://problem/46899601> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fix API test failure after r239887. After removing the retain cycle, IDBConnectionToClient will no longer live >+ forever so make sure it is not destructed before UniqueIDBDatabaseConnection unregisters itself. >+ >+ * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteIndex): >+ (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameIndex): >+ * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: >+ > 2019-01-15 Megan Gardner <megan_gardner@apple.com> > > Add Reveal support in iOSMac >diff --git a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp >index 8caaffcd30fa0fa699a640fb42ffb8c74af8579c..e814fb1687aca11392b986cc8291a8fa42d0990c 100644 >--- a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp >@@ -49,14 +49,14 @@ UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection(UniqueIDBDatabase& data > , m_openRequestIdentifier(request.requestData().requestIdentifier()) > { > m_database->server().registerDatabaseConnection(*this); >- m_connectionToClient.registerDatabaseConnection(*this); >+ m_connectionToClient->registerDatabaseConnection(*this); > } > > UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection() > { > if (m_database) > m_database->server().unregisterDatabaseConnection(*this); >- m_connectionToClient.unregisterDatabaseConnection(*this); >+ m_connectionToClient->unregisterDatabaseConnection(*this); > } > > bool UniqueIDBDatabaseConnection::hasNonFinishedTransactions() const >@@ -127,7 +127,7 @@ void UniqueIDBDatabaseConnection::didFinishHandlingVersionChange(const IDBResour > void UniqueIDBDatabaseConnection::fireVersionChangeEvent(const IDBResourceIdentifier& requestIdentifier, uint64_t requestedVersion) > { > ASSERT(!m_closePending); >- m_connectionToClient.fireVersionChangeEvent(*this, requestIdentifier, requestedVersion); >+ m_connectionToClient->fireVersionChangeEvent(*this, requestIdentifier, requestedVersion); > } > > UniqueIDBDatabaseTransaction& UniqueIDBDatabaseConnection::createVersionChangeTransaction(uint64_t newVersion) >@@ -172,7 +172,7 @@ void UniqueIDBDatabaseConnection::didAbortTransaction(UniqueIDBDatabaseTransacti > ASSERT(m_database); > ASSERT(takenTransaction || m_database->hardClosedForUserDelete()); > if (takenTransaction) >- m_connectionToClient.didAbortTransaction(transactionIdentifier, error); >+ m_connectionToClient->didAbortTransaction(transactionIdentifier, error); > } > > void UniqueIDBDatabaseConnection::didCommitTransaction(UniqueIDBDatabaseTransaction& transaction, const IDBError& error) >@@ -184,56 +184,56 @@ void UniqueIDBDatabaseConnection::didCommitTransaction(UniqueIDBDatabaseTransact > ASSERT(m_transactionMap.contains(transactionIdentifier)); > m_transactionMap.remove(transactionIdentifier); > >- m_connectionToClient.didCommitTransaction(transactionIdentifier, error); >+ m_connectionToClient->didCommitTransaction(transactionIdentifier, error); > } > > void UniqueIDBDatabaseConnection::didCreateObjectStore(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didCreateObjectStore"); > >- m_connectionToClient.didCreateObjectStore(resultData); >+ m_connectionToClient->didCreateObjectStore(resultData); > } > > void UniqueIDBDatabaseConnection::didDeleteObjectStore(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didDeleteObjectStore"); > >- m_connectionToClient.didDeleteObjectStore(resultData); >+ m_connectionToClient->didDeleteObjectStore(resultData); > } > > void UniqueIDBDatabaseConnection::didRenameObjectStore(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didRenameObjectStore"); > >- m_connectionToClient.didRenameObjectStore(resultData); >+ m_connectionToClient->didRenameObjectStore(resultData); > } > > void UniqueIDBDatabaseConnection::didClearObjectStore(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didClearObjectStore"); > >- m_connectionToClient.didClearObjectStore(resultData); >+ m_connectionToClient->didClearObjectStore(resultData); > } > > void UniqueIDBDatabaseConnection::didCreateIndex(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didCreateIndex"); > >- m_connectionToClient.didCreateIndex(resultData); >+ m_connectionToClient->didCreateIndex(resultData); > } > > void UniqueIDBDatabaseConnection::didDeleteIndex(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didDeleteIndex"); > >- m_connectionToClient.didDeleteIndex(resultData); >+ m_connectionToClient->didDeleteIndex(resultData); > } > > void UniqueIDBDatabaseConnection::didRenameIndex(const IDBResultData& resultData) > { > LOG(IndexedDB, "UniqueIDBDatabaseConnection::didRenameIndex"); > >- m_connectionToClient.didRenameIndex(resultData); >+ m_connectionToClient->didRenameIndex(resultData); > } > > bool UniqueIDBDatabaseConnection::connectionIsClosing() const >diff --git a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h >index 93e1fa2166fc6107f3ee2ebc5d1166112bca442a..41a13c925040b28043455f16b5022bc1f0c4b517 100644 >--- a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h >+++ b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h >@@ -90,7 +90,7 @@ private: > UniqueIDBDatabaseConnection(UniqueIDBDatabase&, ServerOpenDBRequest&); > > WeakPtr<UniqueIDBDatabase> m_database; >- IDBConnectionToClient& m_connectionToClient; >+ Ref<IDBConnectionToClient> m_connectionToClient; > IDBResourceIdentifier m_openRequestIdentifier; > > bool m_closePending { false };
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 193097
:
358271
|
358930
| 359249