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

Unified Diff: base/metrics/persistent_memory_allocator.cc

Issue 2907543003: Support persistent system profiles. (Closed)
Patch Set: addressed review comments by asvitkine Created 3 years, 7 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: base/metrics/persistent_memory_allocator.cc
diff --git a/base/metrics/persistent_memory_allocator.cc b/base/metrics/persistent_memory_allocator.cc
index deb82ac1dbe28aa26d14ee98f48139b3068b3488..f569efa5fd353d9ea18141202a130091129665cd 100644
--- a/base/metrics/persistent_memory_allocator.cc
+++ b/base/metrics/persistent_memory_allocator.cc
@@ -162,6 +162,11 @@ void PersistentMemoryAllocator::Iterator::Reset() {
}
void PersistentMemoryAllocator::Iterator::Reset(Reference starting_after) {
+ if (starting_after == 0) {
+ Reset();
+ return;
+ }
+
last_record_.store(starting_after, std::memory_order_relaxed);
record_count_.store(0, std::memory_order_relaxed);

Powered by Google App Engine
This is Rietveld 408576698