Index: mojo/runner/context.cc |
diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc |
index f1bb1a468ae26b4b75343822f6a8611587f439c8..462ed84d350d8435d09a0253a0e98ab58fcf7bbe 100644 |
--- a/mojo/runner/context.cc |
+++ b/mojo/runner/context.cc |
@@ -259,7 +259,7 @@ void Context::Shutdown() { |
void Context::OnShutdownComplete() { |
DCHECK_EQ(base::MessageLoop::current()->task_runner(), |
task_runners_->shell_runner()); |
- base::MessageLoop::current()->Quit(); |
+ base::MessageLoop::current()->QuitWhenIdle(); |
} |
void Context::Run(const GURL& url) { |
@@ -302,7 +302,7 @@ void Context::OnApplicationEnd(const GURL& url) { |
DCHECK_EQ(base::MessageLoop::current()->task_runner(), |
task_runners_->shell_runner()); |
if (app_complete_callback_.is_null()) { |
- base::MessageLoop::current()->Quit(); |
+ base::MessageLoop::current()->QuitWhenIdle(); |
} else { |
app_complete_callback_.Run(); |
} |