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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « base/trace_event/memory_dump_manager.h ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0ec5d1983374538598af6422d2084385c47dcbaa 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() {
@@ -128,17 +129,19 @@ void MemoryDumpManager::CreateLocalDumpPoint(DumpPointType dump_point_type,
AutoLock lock(lock_);
for (auto it = dump_providers_enabled_.begin();
it != dump_providers_enabled_.end();) {
- MemoryDumpProvider* dump_provider = *it;
- if (dump_provider->DumpInto(pmd.get())) {
+ dump_provider_currently_active_ = *it;
+ if (dump_provider_currently_active_->DumpInto(pmd.get())) {
did_any_provider_dump = true;
++it;
} else {
- LOG(ERROR) << "The memory dumper " << dump_provider->GetFriendlyName()
+ LOG(ERROR) << "The memory dumper "
+ << dump_provider_currently_active_->GetFriendlyName()
<< " failed, possibly due to sandboxing (crbug.com/461788), "
"disabling it for current process. Try restarting chrome "
"with the --no-sandbox switch.";
it = dump_providers_enabled_.erase(it);
}
+ dump_provider_currently_active_ = nullptr;
}
}
« no previous file with comments | « base/trace_event/memory_dump_manager.h ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698