Commit 8d409070 authored by Collin Baker's avatar Collin Baker Committed by Commit Bot

Add null check in RenderWidgetHostViewChildFrame::GetNativeView()

Other functions in the class do similar null checks. See bug report for
crashes on frame_connector_->GetParentRenderWidgetHostView() call.

Bug: 1041922
Change-Id: Ifbd3023aa24bd307841bc97dbc03ed444a8bc85d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083739Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Collin Baker <collinbaker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746461}
parent 0b169130
......@@ -307,6 +307,9 @@ void RenderWidgetHostViewChildFrame::SetInsets(const gfx::Insets& insets) {
}
gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() {
if (!frame_connector_)
return nullptr;
RenderWidgetHostView* parent_view =
frame_connector_->GetParentRenderWidgetHostView();
return parent_view ? parent_view->GetNativeView() : nullptr;
......
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