Index: base/timer/timer.cc |
diff --git a/base/timer/timer.cc b/base/timer/timer.cc |
index 11f73ca4290e4947a537cfa370dadcef7dca85d5..fa6b8cd2724a034ecf7d5fea48bad4e41884ee97 100644 |
--- a/base/timer/timer.cc |
+++ b/base/timer/timer.cc |
@@ -163,8 +163,10 @@ void Timer::PostNewScheduledTask(TimeDelta delay) { |
} |
// Remember the thread ID that posts the first task -- this will be verified |
// later when the task is abandoned to detect misuse from multiple threads. |
- if (!thread_id_) |
+ if (!thread_id_) { |
+ DCHECK(GetTaskRunner()->BelongsToCurrentThread()); |
thread_id_ = static_cast<int>(PlatformThread::CurrentId()); |
+ } |
} |
scoped_refptr<SingleThreadTaskRunner> Timer::GetTaskRunner() { |