Chromium Code Reviews| Index: jingle/notifier/base/xmpp_connection.cc |
| diff --git a/jingle/notifier/base/xmpp_connection.cc b/jingle/notifier/base/xmpp_connection.cc |
| index d50adb027451839babb5e6ca53ac8519cc977603..8c321bcfd3f79027ba562ae5ccafe9c310d589d5 100644 |
| --- a/jingle/notifier/base/xmpp_connection.cc |
| +++ b/jingle/notifier/base/xmpp_connection.cc |
| @@ -8,8 +8,8 @@ |
| #include "base/compiler_specific.h" |
| #include "base/logging.h" |
| -#include "base/message_loop/message_loop.h" |
| #include "base/strings/string_piece.h" |
| +#include "base/threading/thread_task_runner_handle.h" |
| #include "jingle/glue/chrome_async_socket.h" |
| #include "jingle/glue/task_pump.h" |
| #include "jingle/glue/xmpp_client_socket_factory.h" |
| @@ -82,13 +82,13 @@ XmppConnection::~XmppConnection() { |
| DCHECK(CalledOnValidThread()); |
| ClearClient(); |
| task_pump_->Stop(); |
| - base::MessageLoop* current_message_loop = base::MessageLoop::current(); |
| - CHECK(current_message_loop); |
| // We do this because XmppConnection may get destroyed as a result |
| // of a signal from XmppClient. If we delete |task_pump_| here, bad |
| // things happen when the stack pops back up to the XmppClient's |
| // (which is deleted by |task_pump_|) function. |
| - current_message_loop->DeleteSoon(FROM_HERE, task_pump_.release()); |
| + CHECK(base::ThreadTaskRunnerHandle::IsSet()); |
|
Sergey Ulanov
2016/06/20 22:53:25
I don't think you need this CHECK(). There is DCHE
fdoray
2016/06/21 13:01:51
Done.
|
| + base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, |
| + task_pump_.release()); |
| } |
| void XmppConnection::OnStateChange(buzz::XmppEngine::State state) { |