Index: base/trace_event/memory_allocator_dump.cc |
diff --git a/base/trace_event/memory_allocator_dump.cc b/base/trace_event/memory_allocator_dump.cc |
index f9b5799c05eb04b388e37dd6d7858d554990a65a..7583763889ef8b975840d0bcadd12feb359be9a6 100644 |
--- a/base/trace_event/memory_allocator_dump.cc |
+++ b/base/trace_event/memory_allocator_dump.cc |
@@ -80,6 +80,13 @@ void MemoryAllocatorDump::AddScalarF(const char* name, |
void MemoryAllocatorDump::AddString(const char* name, |
const char* units, |
const std::string& value) { |
+ // String attributes are disabled in background mode. |
+ if (process_memory_dump_->dump_args().level_of_detail == |
+ MemoryDumpLevelOfDetail::BACKGROUND) { |
+ NOTREACHED(); |
+ return; |
+ } |
+ |
attributes_->BeginDictionary(name); |
attributes_->SetString("type", kTypeString); |
attributes_->SetString("units", units); |