summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/simple/simple_index_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/simple/simple_index_file.cc')
-rw-r--r--net/disk_cache/simple/simple_index_file.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index 025ffe9..7e80c02 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -423,7 +423,10 @@ void SimpleIndexFile::Deserialize(const char* data, int data_len,
return;
}
- entries->reserve(index_metadata.GetNumberOfEntries() + kExtraSizeForMerge);
+#if !defined(OS_WIN)
+ // TODO(gavinp): Consider using std::unordered_map.
+ entries->resize(index_metadata.GetNumberOfEntries() + kExtraSizeForMerge);
+#endif
while (entries->size() < index_metadata.GetNumberOfEntries()) {
uint64_t hash_key;
EntryMetadata entry_metadata;