summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/disk_cache/backend_unittest.cc4
-rw-r--r--net/disk_cache/entry_impl.cc2
-rw-r--r--net/disk_cache/file_win.cc4
-rw-r--r--net/disk_cache/mem_entry_impl.cc2
4 files changed, 8 insertions, 4 deletions
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 4b61133..63d5a28 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -507,10 +507,10 @@ void DiskCacheBackendTest::BackendEnumerations() {
if (count < kNumEntries) {
last_modified[count] = entry->GetLastModified();
last_used[count] = entry->GetLastUsed();
+ EXPECT_TRUE(initial <= last_modified[count]);
+ EXPECT_TRUE(final >= last_modified[count]);
}
- EXPECT_TRUE(initial <= last_modified[count]);
- EXPECT_TRUE(final >= last_modified[count]);
entry->Close();
count++;
};
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc
index 2e852a4..d82cb48 100644
--- a/net/disk_cache/entry_impl.cc
+++ b/net/disk_cache/entry_impl.cc
@@ -579,9 +579,9 @@ void EntryImpl::SetTimes(base::Time last_used, base::Time last_modified) {
}
bool EntryImpl::CreateDataBlock(int index, int size) {
- Addr address(entry_.Data()->data_addr[index]);
DCHECK(index >= 0 && index < NUM_STREAMS);
+ Addr address(entry_.Data()->data_addr[index]);
if (!CreateBlock(size, &address))
return false;
diff --git a/net/disk_cache/file_win.cc b/net/disk_cache/file_win.cc
index ce4a602..d5a85e1 100644
--- a/net/disk_cache/file_win.cc
+++ b/net/disk_cache/file_win.cc
@@ -62,7 +62,9 @@ MyOverlapped::MyOverlapped(disk_cache::File* file, size_t offset,
MyOverlapped::~MyOverlapped() {
if (delete_buffer_) {
DCHECK(!callback_);
- delete buffer_;
+ // This whole thing could be updated to use IOBuffer, but PostWrite is not
+ // used at the moment. TODO(rvargas): remove or update this code.
+ delete[] reinterpret_cast<const char*>(buffer_);
}
}
diff --git a/net/disk_cache/mem_entry_impl.cc b/net/disk_cache/mem_entry_impl.cc
index 77e1b32..9b8c1c9 100644
--- a/net/disk_cache/mem_entry_impl.cc
+++ b/net/disk_cache/mem_entry_impl.cc
@@ -17,6 +17,8 @@ MemEntryImpl::MemEntryImpl(MemBackendImpl* backend) {
doomed_ = false;
backend_ = backend;
ref_count_ = 0;
+ next_ = NULL;
+ prev_ = NULL;
for (int i = 0; i < NUM_STREAMS; i++)
data_size_[i] = 0;
}