Since the correct lifetime management of the Browser and Profile objects depends upon BrowserProcess::Unpin() being the sole controller of when to exit the browser RunLoop, there is a risk that other code intended to run in the context of a nested RunLoop accidentally causes the main RunLoop to quit (and thereby exit or crash the browser process) by calling QuitCurrentWhenIdleDeprecated.
Mediaum/long-term, we should migrate callers off that API and remove it.
Short-term we can address the special-case of the BrowserMainLoop's RunLoop by migrating BrowserProcess to using the RunLoop's QuitClosure to quit it, and then disallowing QuitCurrentWhenIdleDeprecated from being called on it, so that broken call-sites can be easily identified, and fixed.
Comment 1 by w...@chromium.org
, May 17 2018