Index: mojo/apps/js/application_delegate_impl.cc |
diff --git a/mojo/apps/js/application_delegate_impl.cc b/mojo/apps/js/application_delegate_impl.cc |
index eb784a9165ecb9b60570ac38b8b8c972386d3cbe..90495a3faa71ebd8f6052eea8c8f6554d4ccca64 100644 |
--- a/mojo/apps/js/application_delegate_impl.cc |
+++ b/mojo/apps/js/application_delegate_impl.cc |
@@ -37,6 +37,8 @@ void ApplicationDelegateImpl::QuitJSApp(JSApp* app) { |
std::find(app_vector_.begin(), app_vector_.end(), app); |
if (itr != app_vector_.end()) |
app_vector_.erase(itr); |
+ if (app_vector_.empty()) |
+ base::MessageLoop::current()->QuitWhenIdle(); |
} |
void ApplicationDelegateImpl::ConnectToService( |