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

Unified Diff: base/metrics/persistent_histogram_allocator.cc

Issue 1885933002: Ensure that DLOG(FATAL) also asserts in release-with-asserts builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment with installer fix Created 4 years, 8 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 | « base/message_loop/incoming_task_queue.cc ('k') | base/threading/platform_thread_win.cc » ('j') | 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 1d5c0ef0e1c5d90175f8456469b67502f34e1d28..d37ceac5a4b92ec293b3d3537f1365811f1b5558 100644
--- a/base/metrics/persistent_histogram_allocator.cc
+++ b/base/metrics/persistent_histogram_allocator.cc
@@ -160,9 +160,14 @@ PersistentHistogramAllocator::GetCreateHistogramResultHistogram() {
if (!initialized) {
initialized = true;
if (g_allocator) {
+// Don't log in release-with-asserts builds, otherwise the test_installer step
+// fails because this code writes to a log file before the installer code had a
+// chance to set the log file's location.
+#if !defined(DCHECK_ALWAYS_ON)
DLOG(WARNING) << "Creating the results-histogram inside persistent"
<< " memory can cause future allocations to crash if"
<< " that memory is ever released (for testing).";
+#endif
}
histogram_pointer = LinearHistogram::FactoryGet(
« no previous file with comments | « base/message_loop/incoming_task_queue.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698