Index: content/browser/indexed_db/indexed_db_database.cc |
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc |
index ba53e662159375769f86f070d8fec6f560022555..7dcb931482c5fb0aa301643a464e9df748d20696 100644 |
--- a/content/browser/indexed_db/indexed_db_database.cc |
+++ b/content/browser/indexed_db/indexed_db_database.cc |
@@ -1589,6 +1589,16 @@ void IndexedDBDatabase::DeleteDatabaseFinal( |
factory_->DatabaseDeleted(identifier_); |
} |
+void IndexedDBDatabase::ForceClose() { |
+ // IndexedDBConnection::ForceClose() may delete this database, so hold ref. |
+ scoped_refptr<IndexedDBDatabase> protect(this); |
+ ConnectionSet::const_iterator it = connections_.begin(); |
+ while (it != connections_.end()) { |
+ IndexedDBConnection* connection = *it++; |
+ connection->ForceClose(); |
+ } |
jsbell
2014/01/09 18:09:11
Can you add a DCHECK that connections_ is empty()
cmumford
2014/01/09 18:46:09
Done.
|
+} |
+ |
void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) { |
DCHECK(connections_.count(connection)); |
DCHECK(connection->IsConnected()); |