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

Unified Diff: base/trace_event/memory_dump_scheduler.cc

Issue 2787533002: memory-infra: Avoid dereferencing polling_state_ when it could be null (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_scheduler.cc
diff --git a/base/trace_event/memory_dump_scheduler.cc b/base/trace_event/memory_dump_scheduler.cc
index 66ea6c9f1aeb5dd98b8af1ac43d11a26b0d025be..f63e85e148b274b788acbd8d72aefc1fdc29f7c8 100644
--- a/base/trace_event/memory_dump_scheduler.cc
+++ b/base/trace_event/memory_dump_scheduler.cc
@@ -171,7 +171,7 @@ void MemoryDumpScheduler::RequestPeriodicGlobalDump() {
}
void MemoryDumpScheduler::PollMemoryOnPollingThread() {
- if (polling_state_->current_state != PollingTriggerState::ENABLED)
+ if (!polling_state_)
Primiano Tucci (use gerrit) 2017/03/29 16:21:22 I think you need both checks, i.e. if (!polling_st
ssid 2017/03/29 16:41:45 No the fix is correct as it is. As soon as disable
ssid 2017/03/29 16:46:38 Maybe a dcheck(enabled)
return;
uint64_t polled_memory = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698