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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2029623002: Avoid deleting RenderProcessHostImpl for in-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check in clean up Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 08d50a2c5ce8246f4f49130387eedcdc43d6a039..1e82708bbc405101c859641ade68836f6e23456e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1176,10 +1176,7 @@ void RenderProcessHostImpl::AddRoute(int32_t routing_id,
void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) {
DCHECK(listeners_.Lookup(routing_id) != NULL);
listeners_.Remove(routing_id);
-
- // Keep the one renderer thread around forever in single process mode.
- if (!run_renderer_in_process())
- Cleanup();
+ Cleanup();
}
void RenderProcessHostImpl::AddObserver(RenderProcessHostObserver* observer) {
@@ -1813,6 +1810,10 @@ bool RenderProcessHostImpl::IgnoreInputEvents() const {
}
void RenderProcessHostImpl::Cleanup() {
+ // Keep the one renderer thread around forever in single process mode.
+ if (run_renderer_in_process())
+ return;
+
// If within_process_died_observer_ is true, one of our observers performed an
// action that caused us to die (e.g. http://crbug.com/339504). Therefore,
// delay the destruction until all of the observer callbacks have been made,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698