Browse Source

Merge pull request #2607 from atom/fix-quit

win: Delay quitting until next tick of message loop
Cheng Zhao 9 years ago
parent
commit
04d8f3218f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      atom/browser/browser.cc

+ 2 - 1
atom/browser/browser.cc

@@ -45,7 +45,8 @@ void Browser::Shutdown() {
   FOR_EACH_OBSERVER(BrowserObserver, observers_, OnQuit());
 
   is_quiting_ = true;
-  base::MessageLoop::current()->Quit();
+  base::MessageLoop::current()->PostTask(
+      FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
 }
 
 std::string Browser::GetVersion() const {