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..3f7f98a947157119f6ec73f7a5ce9dfcc02b6e9c 100644 |
--- a/content/browser/indexed_db/indexed_db_database.cc |
+++ b/content/browser/indexed_db/indexed_db_database.cc |
@@ -1589,6 +1589,17 @@ 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(); |
+ } |
+ DCHECK(connections_.empty()); |
+} |
+ |
void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) { |
DCHECK(connections_.count(connection)); |
DCHECK(connection->IsConnected()); |