Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: mojo/apps/js/application_delegate_impl.cc

Issue 627093002: mojo_js_standalone will quit after the last JSApp quits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to fix the inexplicable fail-to-commit with a resync Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/apps/js/js_app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | mojo/apps/js/js_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698