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

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

Issue 2446543004: Fix RPHI message queueing during process death (Closed)
Patch Set: Created 4 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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index d782ebeb9721680ac016e8f8c2c814b05dc723be..86fdd4e8ff22f2145cf9485bb573ee7b21882cd9 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -272,6 +272,12 @@ RenderViewHostImpl::RenderViewHostImpl(
GetProcess()->AddObserver(this);
+ // New views may be created during RenderProcessHost::ProcessDied(), within a
+ // brief window where the internal ChannelProxy is null. This ensures that the
+ // ChannelProxy is re-initialized in such cases so that subsequent messages
+ // make their way to the new renderer once its restarted.
+ GetProcess()->EnsureHasChannel();
+
if (ResourceDispatcherHostImpl::Get()) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698