Update atom::Browser

This commit is contained in:
Cheng Zhao 2017-01-24 12:38:46 +09:00 committed by Kevin Sawicki
parent e91eed6758
commit a95bd227c3

View file

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