Commit dcd04115 authored by W. James MacLean's avatar W. James MacLean Committed by Commit Bot

Speculative fix for crash in RWHVCF::SetTooltipText().

Since the use of GetCursorManager() came after this bug was filed, let's
assume we're hitting either a null frame_connector_ or the root view
is unavailable.

Bug: 831972
Change-Id: I9868fca6872c15a7b178fbb6b5d489dabfdf4729
Reviewed-on: https://chromium-review.googlesource.com/1023166Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552834}
parent e41f49a5
......@@ -437,9 +437,14 @@ void RenderWidgetHostViewChildFrame::Destroy() {
void RenderWidgetHostViewChildFrame::SetTooltipText(
const base::string16& tooltip_text) {
frame_connector_->GetRootRenderWidgetHostView()
->GetCursorManager()
->SetTooltipTextForView(this, tooltip_text);
if (!frame_connector_)
return;
auto* root_view = frame_connector_->GetRootRenderWidgetHostView();
if (!root_view)
return;
root_view->GetCursorManager()->SetTooltipTextForView(this, tooltip_text);
}
RenderWidgetHostViewBase* RenderWidgetHostViewChildFrame::GetParentView() {
......
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