void IDBDatabase::stop() { LOG(IndexedDB, "IDBDatabase::stop - %" PRIu64, m_databaseConnectionIdentifier); Vector<IDBResourceIdentifier> transactionIdentifiers; transactionIdentifiers.reserveInitialCapacity(m_activeTransactions.size()); for (auto& id : m_activeTransactions.keys()) transactionIdentifiers.uncheckedAppend(id); for (auto& id : transactionIdentifiers) { IDBTransaction* transaction = m_activeTransactions.get(id); if (transaction) transaction->stop(); } close(); }
void IDBDatabase::stop() { LOG(IndexedDB, "IDBDatabase::stop - %" PRIu64, m_databaseConnectionIdentifier); ASSERT(&originThread() == &Thread::current()); removeAllEventListeners(); Vector<IDBResourceIdentifier> transactionIdentifiers; transactionIdentifiers.reserveInitialCapacity(m_activeTransactions.size()); for (auto& id : m_activeTransactions.keys()) transactionIdentifiers.uncheckedAppend(id); for (auto& id : transactionIdentifiers) { IDBTransaction* transaction = m_activeTransactions.get(id); if (transaction) transaction->stop(); } close(); }