diff --git a/atom/browser/browser.cc b/atom/browser/browser.cc index 0b20d4f226c9..9b7423cd7d9f 100644 --- a/atom/browser/browser.cc +++ b/atom/browser/browser.cc @@ -12,6 +12,7 @@ #include "atom/browser/window_list.h" #include "base/files/file_util.h" #include "base/path_service.h" +#include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h" #include "brightray/browser/brightray_paths.h" @@ -86,7 +87,7 @@ void Browser::Shutdown() { for (BrowserObserver& observer : observers_) observer.OnQuit(); - if (base::MessageLoop::current()) { + if (base::ThreadTaskRunnerHandle::IsSet()) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } else {