summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/indexed_db/indexed_db_factory.cc3
-rw-r--r--content/browser/indexed_db/indexed_db_factory_unittest.cc4
2 files changed, 5 insertions, 2 deletions
diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc
index 7be451f..1a83332 100644
--- a/content/browser/indexed_db/indexed_db_factory.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -131,6 +131,7 @@ void IndexedDBFactory::GetDatabaseNames(
}
callbacks->OnSuccess(backing_store->GetDatabaseNames());
+ backing_store = NULL;
ReleaseBackingStore(origin_url, false /* immediate */);
}
@@ -182,6 +183,8 @@ void IndexedDBFactory::DeleteDatabase(
database_map_[unique_identifier] = database;
database->DeleteDatabase(callbacks);
database_map_.erase(unique_identifier);
+ database = NULL;
+ backing_store = NULL;
ReleaseBackingStore(origin_url, false /* immediate */);
}
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index 7d958e7..f99df63 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -316,7 +316,7 @@ TEST_F(IndexedDBFactoryTest, DeleteDatabaseClosesBackingStore) {
temp_directory.path());
EXPECT_TRUE(factory->IsBackingStoreOpen(origin));
- EXPECT_FALSE(factory->IsBackingStorePendingClose(origin));
+ EXPECT_TRUE(factory->IsBackingStorePendingClose(origin));
// Now simulate shutdown, which should stop the timer.
factory->ContextDestroyed();
@@ -342,7 +342,7 @@ TEST_F(IndexedDBFactoryTest, GetDatabaseNamesClosesBackingStore) {
temp_directory.path());
EXPECT_TRUE(factory->IsBackingStoreOpen(origin));
- EXPECT_FALSE(factory->IsBackingStorePendingClose(origin));
+ EXPECT_TRUE(factory->IsBackingStorePendingClose(origin));
// Now simulate shutdown, which should stop the timer.
factory->ContextDestroyed();