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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2743873002: mus: Avoid a crash when the gpu mojom connection is lost. (Closed)
Patch Set: Created 3 years, 9 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/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 7b9801a18dbfadde5bad8f9646fb56e3b5f1b551..f85e95829608371ce830d9fdeda5eb8f90d593be 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1863,10 +1863,14 @@ RenderThreadImpl::CreateCompositorFrameSink(
#if defined(USE_AURA)
if (!use_software && IsRunningInMash() &&
!command_line.HasSwitch(switches::kNoUseMusInRenderer)) {
+ scoped_refptr<gpu::GpuChannelHost> channel = EstablishGpuChannelSync();
+ // If the channel could not be established correctly, then return null. This
+ // would cause the compositor to wait and try again at a later time.
+ if (!channel)
+ return nullptr;
return RendererWindowTreeClient::Get(routing_id)
->CreateCompositorFrameSink(
- frame_sink_id,
- gpu_->CreateContextProvider(EstablishGpuChannelSync()),
+ frame_sink_id, gpu_->CreateContextProvider(std::move(channel)),
GetGpuMemoryBufferManager());
}
#endif
« 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