Commit 789a7a44 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Fix crash in WasTargetForLastMouseEvent

The frame could be null, ensure if it is we return early.

BUG=1130991

Change-Id: I8ced1223f4beb281adcb06c99d9b0fc4b761333e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468237Reviewed-by: default avatarMustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816763}
parent b4476e3a
...@@ -673,10 +673,10 @@ gfx::Point WebPluginContainerImpl::LocalToRootFramePoint( ...@@ -673,10 +673,10 @@ gfx::Point WebPluginContainerImpl::LocalToRootFramePoint(
} }
bool WebPluginContainerImpl::WasTargetForLastMouseEvent() { bool WebPluginContainerImpl::WasTargetForLastMouseEvent() {
return element_->GetDocument() auto* frame = element_->GetDocument().GetFrame();
.GetFrame() if (!frame)
->GetEventHandler() return false;
.GetElementUnderMouse() == element_; return frame->GetEventHandler().GetElementUnderMouse() == element_;
} }
void WebPluginContainerImpl::DidReceiveResponse( void WebPluginContainerImpl::DidReceiveResponse(
......
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