Changeset 197057 in webkit
- Timestamp:
- Feb 24, 2016, 4:23:38 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
Modules/indexeddb/server/UniqueIDBDatabase.cpp (modified) (6 diffs)
-
Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp (modified) (1 diff)
-
Modules/indexeddb/server/UniqueIDBDatabaseConnection.h (modified) (1 diff)
-
Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r197056 r197057 1 2016-02-24 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: Some w3c objectstore tests crash under GuardMalloc. 4 https://bugs.webkit.org/show_bug.cgi?id=154460 5 6 Reviewed by Alex Christensen. 7 8 No new tests (Covered by existing tests). 9 10 * Modules/indexeddb/server/UniqueIDBDatabase.cpp: 11 (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase): 12 (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation): 13 (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Don't delete the UniqueIDBDatabase yet 14 if there are still any connections pending close. 15 (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction): 16 (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): 17 (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): It's possible that with this 18 transaction completing, and a connection finished its close process, that the UniqueIDBDatabase is 19 now ready to be deleted. 20 21 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 22 (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback): 23 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: 24 25 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: 26 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback): 27 1 28 2016-02-24 Konstantin Tokarev <annulen@yandex.ru> 2 29 -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
r196191 r197057 60 60 ASSERT(m_pendingTransactions.isEmpty()); 61 61 ASSERT(m_openDatabaseConnections.isEmpty()); 62 ASSERT(m_closePendingDatabaseConnections.isEmpty()); 62 63 } 63 64 … … 182 183 } 183 184 184 // Even though we have no open database connections, we might have close-pending database connections 185 // that are waiting on transactions to complete. 186 if (!m_inProgressTransactions.isEmpty()) { 187 ASSERT(!m_closePendingDatabaseConnections.isEmpty()); 188 return; 189 } 185 if (!m_inProgressTransactions.isEmpty()) 186 return; 190 187 191 188 ASSERT(!hasAnyPendingCallbacks()); … … 242 239 m_deleteBackingStoreInProgress = false; 243 240 244 if (m_pendingOpenDBRequests.isEmpty()) 245 m_server.deleteUniqueIDBDatabase(*this); 246 else 247 invokeOperationAndTransactionTimer(); 241 if (m_closePendingDatabaseConnections.isEmpty()) { 242 if (m_pendingOpenDBRequests.isEmpty()) 243 m_server.deleteUniqueIDBDatabase(*this); 244 else 245 invokeOperationAndTransactionTimer(); 246 } 248 247 } 249 248 … … 979 978 LOG(IndexedDB, "(main) UniqueIDBDatabase::didPerformCommitTransaction"); 980 979 980 performErrorCallback(callbackIdentifier, error); 981 981 982 inProgressTransactionCompleted(transactionIdentifier); 982 983 performErrorCallback(callbackIdentifier, error);984 983 } 985 984 … … 1029 1028 } 1030 1029 1030 performErrorCallback(callbackIdentifier, error); 1031 1031 1032 inProgressTransactionCompleted(transactionIdentifier); 1032 1033 performErrorCallback(callbackIdentifier, error);1034 1033 } 1035 1034 … … 1245 1244 m_closePendingDatabaseConnections.remove(&transaction->databaseConnection()); 1246 1245 1246 // It's possible that this database had its backing store deleted but there were a few outstanding asynchronous operations. 1247 // If this transaction completing was the last of those operations, we can finally delete this UniqueIDBDatabase. 1248 if (m_closePendingDatabaseConnections.isEmpty() && m_pendingOpenDBRequests.isEmpty() && !m_databaseInfo) { 1249 m_server.deleteUniqueIDBDatabase(*this); 1250 return; 1251 } 1252 1247 1253 // Previously blocked operations might be runnable. 1248 1254 invokeOperationAndTransactionTimer(); -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp
r194496 r197057 65 65 { 66 66 return !m_transactionMap.isEmpty(); 67 } 68 69 void UniqueIDBDatabaseConnection::abortTransactionWithoutCallback(UniqueIDBDatabaseTransaction& transaction) 70 { 71 ASSERT(m_transactionMap.contains(transaction.info().identifier())); 72 auto takenTransaction = m_transactionMap.take(transaction.info().identifier()); 73 74 m_database.abortTransaction(*takenTransaction, [](const IDBError&) { }); 67 75 } 68 76 -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h
r194452 r197057 74 74 void didFireVersionChangeEvent(const IDBResourceIdentifier& requestIdentifier); 75 75 76 void abortTransactionWithoutCallback(UniqueIDBDatabaseTransaction&); 77 76 78 private: 77 79 UniqueIDBDatabaseConnection(UniqueIDBDatabase&, IDBConnectionToClient&); -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp
r195787 r197057 80 80 LOG(IndexedDB, "UniqueIDBDatabaseTransaction::abortWithoutCallback"); 81 81 82 m_databaseConnection-> database().abortTransaction(*this, [](const IDBError&) { });82 m_databaseConnection->abortTransactionWithoutCallback(*this); 83 83 } 84 84
Note:
See TracChangeset
for help on using the changeset viewer.