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

Unified Diff: base/metrics/persistent_histogram_allocator.cc

Issue 2638093002: Don't crash debug builds for full allocator. (Closed)
Patch Set: added comment Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator.cc
diff --git a/base/metrics/persistent_histogram_allocator.cc b/base/metrics/persistent_histogram_allocator.cc
index 6cf22de5d3302af4befaa2adea91cbbd8484026e..b398cd84c5ce18a967768e175e5bdf3b12cd4cac 100644
--- a/base/metrics/persistent_histogram_allocator.cc
+++ b/base/metrics/persistent_histogram_allocator.cc
@@ -403,7 +403,11 @@ std::unique_ptr<HistogramBase> PersistentHistogramAllocator::AllocateHistogram(
result = CREATE_HISTOGRAM_ALLOCATOR_ERROR;
}
RecordCreateHistogramResult(result);
- NOTREACHED() << "error=" << result;
+
+ // Crash for failures caused by internal bugs but not "full" which is
+ // dependent on outside code.
+ if (result != CREATE_HISTOGRAM_ALLOCATOR_FULL)
+ NOTREACHED() << memory_allocator_->Name() << ", error=" << result;
return nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698