Chromium Code Reviews| Index: base/trace_event/memory_dump_manager.cc |
| diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc |
| index 8b2d930a4bc5ab1e09b0f4295910eff07d474a53..47669d66c611e4c4cc889ee2569889cc95b1a658 100644 |
| --- a/base/trace_event/memory_dump_manager.cc |
| +++ b/base/trace_event/memory_dump_manager.cc |
| @@ -59,7 +59,8 @@ void MemoryDumpManager::SetInstanceForTesting(MemoryDumpManager* instance) { |
| g_instance_for_testing = instance; |
| } |
| -MemoryDumpManager::MemoryDumpManager() : memory_tracing_enabled_(0) { |
| +MemoryDumpManager::MemoryDumpManager() |
| + : dump_provider_currently_active_(nullptr), memory_tracing_enabled_(0) { |
| } |
| MemoryDumpManager::~MemoryDumpManager() { |
| @@ -129,6 +130,7 @@ void MemoryDumpManager::CreateLocalDumpPoint(DumpPointType dump_point_type, |
| for (auto it = dump_providers_enabled_.begin(); |
| it != dump_providers_enabled_.end();) { |
| MemoryDumpProvider* dump_provider = *it; |
| + dump_provider_currently_active_ = dump_provider; |
|
picksi
2015/03/16 09:18:06
Am I correct in thinking that dump_provider_curren
Primiano Tucci (use gerrit)
2015/03/16 09:57:17
Yes, but I couldn't come up with a better alternat
picksi
2015/03/16 10:25:04
"It feels a little dangerous" to me because AsValu
Primiano Tucci (use gerrit)
2015/03/17 10:30:59
I see the point. But on the other side of the trad
|
| if (dump_provider->DumpInto(pmd.get())) { |
| did_any_provider_dump = true; |
| ++it; |
| @@ -139,6 +141,7 @@ void MemoryDumpManager::CreateLocalDumpPoint(DumpPointType dump_point_type, |
| "with the --no-sandbox switch."; |
| it = dump_providers_enabled_.erase(it); |
| } |
| + dump_provider_currently_active_ = nullptr; |
| } |
| } |