| Index: base/trace_event/process_memory_dump.cc
|
| diff --git a/base/trace_event/process_memory_dump.cc b/base/trace_event/process_memory_dump.cc
|
| index 0a2bf66620f4a173dd6e34269db614cf85e1d02e..d8a51ef4fe1e193415b3933a6c1e947b62303998 100644
|
| --- a/base/trace_event/process_memory_dump.cc
|
| +++ b/base/trace_event/process_memory_dump.cc
|
| @@ -253,6 +253,13 @@ void ProcessMemoryDump::DumpHeapUsage(
|
| base::trace_event::TraceEventMemoryOverhead& overhead,
|
| const char* allocator_name) {
|
| if (!metrics_by_context.empty()) {
|
| + // We shouldn't end up here unless we're doing a detailed dump with
|
| + // heap profiling enabled and if that is the case tracing should be
|
| + // enabled which sets up the heap profiler serialization state.
|
| + if (!heap_profiler_serialization_state()) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| DCHECK_EQ(0ul, heap_dumps_.count(allocator_name));
|
| std::unique_ptr<TracedValue> heap_dump = ExportHeapDump(
|
| metrics_by_context, *heap_profiler_serialization_state());
|
|
|