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

Issue 1715833002: Reland: Refactor and shorten in-memory cache. (Closed)

Created:
4 years, 10 months ago by gavinp
Modified:
4 years, 10 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: Refactor and shorten in-memory cache. Previously this code was maintaining a complex doubly-linked list manually, rather than using base::linked_list, which does the same thing. A number of uses of vector were strictly speaking violating the C++98 specification, also fixed. Too many functions were short redirectors into other functions. Now fixed. The originally landed version contained a significant double free bug which caused reversion, now fixed. R=mmenke BUG=581791, 586440 Committed: https://crrev.com/4ffdb91a6e68f0f20fa40a2b224e98ce5da8f629 Cr-Commit-Position: refs/heads/master@{#377124}

Patch Set 1 : ** VERSION AS LANDED ORIGINALLY ** #

Patch Set 2 : now fixed #

Patch Set 3 : narrowed for review #

Patch Set 4 : fix typo in comment #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+410 lines, -619 lines) Patch
M net/disk_cache/backend_unittest.cc View 1 2 3 3 chunks +46 lines, -0 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/disk_cache/memory/mem_backend_impl.h View 4 chunks +30 lines, -36 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.cc View 1 7 chunks +115 lines, -197 lines 0 comments Download
M net/disk_cache/memory/mem_entry_impl.h View 5 chunks +58 lines, -68 lines 0 comments Download
M net/disk_cache/memory/mem_entry_impl.cc View 19 chunks +160 lines, -204 lines 4 comments Download
D net/disk_cache/memory/mem_rankings.h View 1 chunk +0 lines, -44 lines 0 comments Download
D net/disk_cache/memory/mem_rankings.cc View 1 chunk +0 lines, -67 lines 0 comments Download
M net/net.gypi View 1 chunk +0 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 11 (2 generated)
gavinp
Matt, The crash on our first attempt to land this was that the eviction was ...
4 years, 10 months ago (2016-02-19 18:51:39 UTC) #1
gavinp
The new test, btw, runs really slowly in simple cache, which is clearly a bug. ...
4 years, 10 months ago (2016-02-19 18:52:57 UTC) #2
mmenke
https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc File net/disk_cache/memory/mem_entry_impl.cc (right): https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc#newcode300 net/disk_cache/memory/mem_entry_impl.cc:300: it.second->Doom(); So the problem was the child calling backend_->ModifyStorageSize(...) ...
4 years, 10 months ago (2016-02-19 19:08:32 UTC) #3
gavinp
https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc File net/disk_cache/memory/mem_entry_impl.cc (right): https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc#newcode300 net/disk_cache/memory/mem_entry_impl.cc:300: it.second->Doom(); On 2016/02/19 19:08:32, mmenke wrote: > So the ...
4 years, 10 months ago (2016-02-19 19:18:01 UTC) #4
mmenke
https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc File net/disk_cache/memory/mem_entry_impl.cc (right): https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc#newcode300 net/disk_cache/memory/mem_entry_impl.cc:300: it.second->Doom(); On 2016/02/19 19:18:01, gavinp wrote: > On 2016/02/19 ...
4 years, 10 months ago (2016-02-19 19:20:43 UTC) #5
mmenke
LGTM, but wondering about one other thing https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc File net/disk_cache/memory/mem_entry_impl.cc (right): https://codereview.chromium.org/1715833002/diff/60001/net/disk_cache/memory/mem_entry_impl.cc#newcode357 net/disk_cache/memory/mem_entry_impl.cc:357: backend_->ModifyStorageSize(data_[index].size() - ...
4 years, 10 months ago (2016-02-19 19:36:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1715833002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1715833002/60001
4 years, 10 months ago (2016-02-23 19:57:08 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-23 23:28:37 UTC) #9
commit-bot: I haz the power
4 years, 10 months ago (2016-02-23 23:30:47 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4ffdb91a6e68f0f20fa40a2b224e98ce5da8f629
Cr-Commit-Position: refs/heads/master@{#377124}

Powered by Google App Engine
This is Rietveld 408576698