Commit 2df17628 authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

Add null check for proxy

proxy is destroyed in WillShutdown which is called when
LayerTreeHostImpl is destroyed. It is possible input mojo pipes are
still alive and continue to AttachSynchronousCompositor, leading to a
use after free. So add a null check.

Bug: 1028360
Change-Id: Idbd04b0602e59ce330956d5a976403ad5cf18b8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1953388
Auto-Submit: Bo <boliu@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722538}
parent 59eea9e4
......@@ -300,8 +300,11 @@ void WidgetInputHandlerManager::AttachSynchronousCompositor(
compositor_request) {
#if defined(OS_ANDROID)
DCHECK(synchronous_compositor_registry_);
synchronous_compositor_registry_->proxy()->BindChannel(
std::move(control_host), std::move(host), std::move(compositor_request));
if (synchronous_compositor_registry_->proxy()) {
synchronous_compositor_registry_->proxy()->BindChannel(
std::move(control_host), std::move(host),
std::move(compositor_request));
}
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment