Commit d9dc7b0b authored by Stefan Zager's avatar Stefan Zager Committed by Commit Bot

Speculative fix for crasher

The presumptive scenario is remote iframe inside a throttled iframe
inside an active top document. The top document runs a lifecycle
update, which succeeds (i.e., the return value from
LocalFrameView::UpdateAllLifecyclePhases is 'true'); but the middle
frame is throttled and doesn't update, so we can't do a hit test on
it. In that case, just give up on trying to compute occlusion
information.

BUG=1041252
R=chrishtr@chromium.org

Change-Id: If7fadc9daf033bceda9f8a01edc6c3cabf71c066
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003259Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732489}
parent 61dfb4b2
......@@ -388,11 +388,11 @@ void RemoteFrame::UpdateHitTestOcclusionData() {
bool unoccluded = false;
if (base::FeatureList::IsEnabled(
blink::features::kVizHitTestOcclusionCheck)) {
if (HTMLFrameOwnerElement* owner_element = DeprecatedLocalOwner()) {
if (LayoutObject* owner = owner_element->GetLayoutObject()) {
if (LayoutEmbeddedContent* owner = OwnerLayoutObject()) {
if (!owner->GetFrameView()->CanThrottleRendering()) {
HitTestResult hit_test_result(owner->HitTestForOcclusion());
const Node* hit_node = hit_test_result.InnerNode();
unoccluded = (!hit_node || hit_node == owner_element);
unoccluded = (!hit_node || hit_node == owner->GetNode());
}
}
}
......
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