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 eaa8d63661ca6d7bad289330cfa21f775a1ee07f..1c1c78ebf89c2e9862d4ecda1c029cff540f476a 100644 |
--- a/base/trace_event/memory_dump_scheduler.cc |
+++ b/base/trace_event/memory_dump_scheduler.cc |
@@ -96,7 +96,7 @@ void MemoryDumpScheduler::NotifyPollingSupported() { |
void MemoryDumpScheduler::NotifyDumpTriggered() { |
if (polling_state_.polling_task_runner && |
- polling_state_.polling_task_runner->RunsTasksOnCurrentThread()) { |
+ !polling_state_.polling_task_runner->RunsTasksOnCurrentThread()) { |
polling_state_.polling_task_runner->PostTask( |
FROM_HERE, |
Bind(&MemoryDumpScheduler::NotifyDumpTriggered, Unretained(this))); |
@@ -115,7 +115,7 @@ void MemoryDumpScheduler::DisableAllTriggers() { |
} |
void MemoryDumpScheduler::DisablePolling() { |
- if (polling_state_.polling_task_runner->RunsTasksOnCurrentThread()) { |
+ if (!polling_state_.polling_task_runner->RunsTasksOnCurrentThread()) { |
if (polling_state_.polling_task_runner->PostTask( |
FROM_HERE, |
Bind(&MemoryDumpScheduler::DisablePolling, Unretained(this)))) |