Commit ce932c76 authored by Miyoung Shin's avatar Miyoung Shin Committed by Commit Bot

Fix crash in content::BindTextSuggestionHostForFrame

This CL fixes the crash presumed to occur in
content::BindTextSuggestionHostForFrame since RFH::GetView could
return nullptr.

Bug: 1117491
Change-Id: I60293c661d7087083bf728862dfae9e0854daf79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374325Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#801537}
parent d9d91288
......@@ -321,8 +321,7 @@ void BindTextSuggestionHostForFrame(
content::RenderFrameHost* host,
mojo::PendingReceiver<blink::mojom::TextSuggestionHost> receiver) {
auto* view = static_cast<RenderWidgetHostViewAndroid*>(host->GetView());
DCHECK(view);
if (!view->text_suggestion_host())
if (!view || !view->text_suggestion_host())
return;
view->text_suggestion_host()->BindTextSuggestionHost(std::move(receiver));
......
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