Changeset 243903 in webkit
- Timestamp:
- Apr 4, 2019, 1:53:22 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Modules/indexeddb/server/UniqueIDBDatabase.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243901 r243903 1 2019-04-04 Sihui Liu <sihui_liu@apple.com> 2 3 Leak of UniqueIDBDatabase in network process running layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=196565 5 <rdar://problem/49346139> 6 7 Reviewed by Geoffrey Garen. 8 9 UniqueIDBDatabase will null itself after it receives confirmation about connecton close from its clients, but it 10 is possible that the web process to network process connection closes before servers gets the 11 confirmDidCloseFromServer. Therefore, we should let UniqueIDBDatabase forget connection when it receives a 12 conenctionClosedFromClient. 13 14 No new test because this bug is caused by race between network receiving conenctionClosedFromClient and 15 receiving confirmDidCloseFromServer. This is testable by running some existing layout tests in a row with leak 16 option. 17 18 * Modules/indexeddb/server/UniqueIDBDatabase.cpp: 19 (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient): 20 (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer): 21 1 22 2019-04-04 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
r243807 r243903 1734 1734 LOG(IndexedDB, "(main) UniqueIDBDatabase::connectionClosedFromClient - %s (%" PRIu64 ")", connection.openRequestIdentifier().loggingString().utf8().data(), connection.identifier()); 1735 1735 1736 if (m_serverClosePendingDatabaseConnections.contains(&connection)) { 1737 m_serverClosePendingDatabaseConnections.remove(&connection); 1738 if (m_hardClosedForUserDelete) 1739 maybeFinishHardClose(); 1740 return; 1741 } 1742 1736 1743 Ref<UniqueIDBDatabaseConnection> protectedConnection(connection); 1737 1744 m_openDatabaseConnections.remove(&connection); … … 1813 1820 LOG(IndexedDB, "UniqueIDBDatabase::confirmDidCloseFromServer - %s (%" PRIu64 ")", connection.openRequestIdentifier().loggingString().utf8().data(), connection.identifier()); 1814 1821 1822 if (!m_serverClosePendingDatabaseConnections.contains(&connection)) 1823 return; 1824 m_serverClosePendingDatabaseConnections.remove(&connection); 1825 1815 1826 if (m_hardClosedForUserDelete) 1816 1827 maybeFinishHardClose(); 1817 ASSERT(m_serverClosePendingDatabaseConnections.contains(&connection));1818 m_serverClosePendingDatabaseConnections.remove(&connection);1819 1828 } 1820 1829
Note:
See TracChangeset
for help on using the changeset viewer.