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

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

Issue 6927014: Avoid exiting the renderer process if it has a pending render view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More feedback. Created 9 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
Index: content/browser/renderer_host/render_process_host.cc
diff --git a/content/browser/renderer_host/render_process_host.cc b/content/browser/renderer_host/render_process_host.cc
index cf380ab39b80e4c7109ad7f8fd0678c121612532..379ce99329003bb1d16db82a659a982828369626 100644
--- a/content/browser/renderer_host/render_process_host.cc
+++ b/content/browser/renderer_host/render_process_host.cc
@@ -94,6 +94,7 @@ RenderProcessHost::RenderProcessHost(Profile* profile)
: max_page_id_(-1),
fast_shutdown_started_(false),
deleting_soon_(false),
+ pending_views_(0),
id_(ChildProcessInfo::GenerateChildProcessUniqueId()),
profile_(profile),
sudden_termination_allowed_(true),
@@ -143,6 +144,15 @@ void RenderProcessHost::ReportExpectingClose(int32 listener_id) {
listeners_expecting_close_.insert(listener_id);
}
+void RenderProcessHost::AddPendingView() {
+ pending_views_++;
+}
+
+void RenderProcessHost::RemovePendingView() {
+ DCHECK(pending_views_);
+ pending_views_--;
+}
+
void RenderProcessHost::UpdateMaxPageID(int32 page_id) {
if (page_id > max_page_id_)
max_page_id_ = page_id;
« no previous file with comments | « content/browser/renderer_host/render_process_host.h ('k') | content/browser/tab_contents/render_view_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698