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

Unified Diff: net/disk_cache/blockfile/rankings.h

Issue 583293002: Do not leak when iterator outlives disk cache backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cacheenums-again
Patch Set: cleaner ownership Created 6 years, 3 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: net/disk_cache/blockfile/rankings.h
diff --git a/net/disk_cache/blockfile/rankings.h b/net/disk_cache/blockfile/rankings.h
index 4224d0058eb0fff00c12345bf82adc88cf78ad47..b523932498dab92544020161a190bf39a922e6de 100644
--- a/net/disk_cache/blockfile/rankings.h
+++ b/net/disk_cache/blockfile/rankings.h
@@ -94,8 +94,8 @@ class Rankings {
// If we have multiple lists, we have to iterate through all at the same time.
// This structure keeps track of where we are on the iteration.
struct Iterator {
- explicit Iterator(Rankings* rankings);
- ~Iterator();
+ Iterator();
+ void Reset();
List list; // Which entry was returned to the user.
CacheRankingsBlock* nodes[3]; // Nodes on the first three lists.

Powered by Google App Engine
This is Rietveld 408576698