Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1366)

Unified Diff: content/browser/indexed_db/indexed_db_backing_store_unittest.cc

Issue 2760163002: [IndexedDB] Pool and evict leveldb iterators, to save memory (Closed)
Patch Set: comments & lifetime fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_backing_store_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index 3406b3b040332773dcbe2ee017620b6caef3e8de..79e69a7e7eb10e20a7df4c510d20b9ec6d3fc786 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -38,6 +38,7 @@ using url::Origin;
namespace content {
namespace {
+static const size_t kDefaultMaxOpenIteratorsPerDatabase = 50;
// Write |content| to |file|. Returns true on success.
bool WriteFile(const base::FilePath& file, base::StringPiece content) {
@@ -62,7 +63,9 @@ class DefaultLevelDBFactory : public LevelDBFactory {
const LevelDBComparator* comparator,
std::unique_ptr<LevelDBDatabase>* db,
bool* is_disk_full) override {
- return LevelDBDatabase::Open(file_name, comparator, db, is_disk_full);
+ return LevelDBDatabase::Open(file_name, comparator, db,
+ kDefaultMaxOpenIteratorsPerDatabase,
+ is_disk_full);
}
leveldb::Status DestroyLevelDB(const base::FilePath& file_name) override {
return LevelDBDatabase::Destroy(file_name);

Powered by Google App Engine
This is Rietveld 408576698