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

Unified Diff: base/debug/activity_analyzer.cc

Issue 2767193002: Postmortem report collection: validate internal state (Closed)
Patch Set: Created 3 years, 9 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/debug/activity_analyzer.cc
diff --git a/base/debug/activity_analyzer.cc b/base/debug/activity_analyzer.cc
index 7c421e9630922a9135baae81bae052d3e21fb7d7..db3334eebefbb2a83d14265cc7bc614299dfe9ab 100644
--- a/base/debug/activity_analyzer.cc
+++ b/base/debug/activity_analyzer.cc
@@ -4,6 +4,8 @@
#include "base/debug/activity_analyzer.h"
+#include <utility>
+
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/memory_mapped_file.h"
@@ -54,7 +56,9 @@ void ThreadActivityAnalyzer::AddGlobalInformation(
GlobalActivityAnalyzer::GlobalActivityAnalyzer(
std::unique_ptr<PersistentMemoryAllocator> allocator)
- : allocator_(std::move(allocator)), allocator_iterator_(allocator_.get()) {}
+ : allocator_(std::move(allocator)), allocator_iterator_(allocator_.get()) {
+ DCHECK(allocator_);
+}
GlobalActivityAnalyzer::~GlobalActivityAnalyzer() {}

Powered by Google App Engine
This is Rietveld 408576698