Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Dec 12, 2019
1 parent aa4b36a commit fffa366
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shell/browser/browser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ void Browser::Shutdown() {
observer.OnQuit();

if (quit_main_message_loop_) {
std::move(quit_main_message_loop_).Run();
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, std::move(quit_main_message_loop_));
} else {
// There is no message loop available so we are in early stage, wait until
// the quit_main_message_loop_ is available.
Expand Down Expand Up @@ -189,7 +190,8 @@ void Browser::PreMainMessageLoopRun() {

void Browser::SetMainMessageLoopQuitClosure(base::OnceClosure quit_closure) {
if (is_shutdown_)
std::move(quit_closure).Run();
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
std::move(quit_closure));
else
quit_main_message_loop_ = std::move(quit_closure);
}
Expand Down

0 comments on commit fffa366

Please sign in to comment.