Index: base/message_loop/message_loop.cc |
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc |
index 4fecbc5a60383ac5c5a6cd84b92edac99afa6223..d4f9c546b58ae3e3ceabcd7e6b723ab85de81502 100644 |
--- a/base/message_loop/message_loop.cc |
+++ b/base/message_loop/message_loop.cc |
@@ -407,7 +407,8 @@ void MessageLoop::BindToCurrentThread() { |
incoming_task_queue_->StartScheduling(); |
unbound_task_runner_->BindToCurrentThread(); |
- SetTaskRunner(unbound_task_runner_.Pass()); |
+ unbound_task_runner_ = nullptr; |
danakj
2015/07/10 18:32:38
I'm feeling like this unbound_task_runner_ is prov
Sami
2015/07/13 10:43:31
Yes, it's not all that useful but I can't think of
danakj
2015/07/13 18:33:47
Ah, I see. LGTM then.
|
+ SetThreadTaskRunnerHandle(); |
} |
void MessageLoop::SetTaskRunner( |
@@ -416,6 +417,11 @@ void MessageLoop::SetTaskRunner( |
DCHECK(task_runner->BelongsToCurrentThread()); |
DCHECK(!unbound_task_runner_); |
task_runner_ = task_runner.Pass(); |
+ SetThreadTaskRunnerHandle(); |
+} |
+ |
+void MessageLoop::SetThreadTaskRunnerHandle() { |
+ DCHECK_EQ(this, current()); |
// Clear the previous thread task runner first because only one can exist at |
// a time. |
thread_task_runner_handle_.reset(); |