Title: [241913] trunk/Source/WebCore
Revision
241913
Author
[email protected]
Date
2019-02-21 15:06:23 -0800 (Thu, 21 Feb 2019)

Log Message

IndexedDB: leak UniqueIDBDatabase in layout tests
https://bugs.webkit.org/show_bug.cgi?id=194870
<rdar://problem/48163812>

Reviewed by Geoffrey Garen.

UniqueIDBDatabase owns a pointer to itself after it is hard closed. It should release the pointer when it
receives confirmation from clients and all pending tasks are done. UniqueIDBDatabase already checks whether the
pointer should be released when a database task finishes, but it didn't perform a check when a confirm message
is received.

No new test as the order of task completion and confirmation arrival is uncertain.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241912 => 241913)


--- trunk/Source/WebCore/ChangeLog	2019-02-21 22:55:22 UTC (rev 241912)
+++ trunk/Source/WebCore/ChangeLog	2019-02-21 23:06:23 UTC (rev 241913)
@@ -1,3 +1,21 @@
+2019-02-21  Sihui Liu  <[email protected]>
+
+        IndexedDB: leak UniqueIDBDatabase in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=194870
+        <rdar://problem/48163812>
+
+        Reviewed by Geoffrey Garen.
+
+        UniqueIDBDatabase owns a pointer to itself after it is hard closed. It should release the pointer when it 
+        receives confirmation from clients and all pending tasks are done. UniqueIDBDatabase already checks whether the
+        pointer should be released when a database task finishes, but it didn't perform a check when a confirm message 
+        is received. 
+
+        No new test as the order of task completion and confirmation arrival is uncertain.
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):
+
 2019-02-21  Andy Estes  <[email protected]>
 
         contentfiltering tests leak documents

Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (241912 => 241913)


--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp	2019-02-21 22:55:22 UTC (rev 241912)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp	2019-02-21 23:06:23 UTC (rev 241913)
@@ -1519,6 +1519,8 @@
     ASSERT(isMainThread());
     LOG(IndexedDB, "UniqueIDBDatabase::confirmDidCloseFromServer - %s (%" PRIu64 ")", connection.openRequestIdentifier().loggingString().utf8().data(), connection.identifier());
 
+    if (m_hardClosedForUserDelete)
+        maybeFinishHardClose();
     ASSERT(m_serverClosePendingDatabaseConnections.contains(&connection));
     m_serverClosePendingDatabaseConnections.remove(&connection);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to