From 2dc86e97f2cb985faf9149cbe1d8dfde7b5e62ce Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 14 Feb 2017 10:09:42 -0800 Subject: [PATCH] Fix crash during process shutdown (issue #2096) --- patch/patch.cfg | 4 ++++ patch/patches/storage_partition_1973.patch | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/patch/patch.cfg b/patch/patch.cfg index 23d56edaa..2801cd01c 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -248,6 +248,10 @@ patches = [ # Clear RenderProcessHostImpl's |browser_context_| member when the # BrowserContext is deleted. # https://bitbucket.org/chromiumembedded/cef/issues/2032 + # + # Check RenderProcessHostImpl's |browser_context_| member before re- + # initializing the channel from RPHI::ProcessDied. + # https://bitbucket.org/chromiumembedded/cef/issues/2096 'name': 'storage_partition_1973', 'path': '../', }, diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index 8329b5c5e..f39478c4b 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -91,7 +91,7 @@ index 242d33e..4dfb463 100644 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index fb985cd..41d281d 100644 +index fb985cd..b86234f 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc @@ -653,7 +653,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() { @@ -113,6 +113,15 @@ index fb985cd..41d281d 100644 ChromeBlobStorageContext::GetFor(browser_context_))), channel_connected_(false), sent_render_process_ready_(false), +@@ -914,7 +915,7 @@ bool RenderProcessHostImpl::Init() { + } + + void RenderProcessHostImpl::EnableSendQueue() { +- if (!channel_) ++ if (!channel_ && browser_context_) + InitializeChannelProxy(); + } + @@ -1010,6 +1011,22 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() {