Commit 404028ee authored by Stefan Zager's avatar Stefan Zager Committed by Commit Bot

Speculative fix for crash in occlusion hit test for viz hit test data

If a frame is throttled, then it may have dirty layout by the time
PageAnimator::UpdateHitTestOcclusionData runs. There is no empirical
evidence that render throttling is actually causing the crashes in the
wild, so also add a diagnostic CHECK.

BUG=1035029
R=chrishtr@chromium.org

Change-Id: Ie8d1aa5d48cf94832616403e27965722b809020b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972230Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726170}
parent 11cbc4c8
...@@ -362,6 +362,12 @@ bool RemoteFrame::IsIgnoredForHitTest() const { ...@@ -362,6 +362,12 @@ bool RemoteFrame::IsIgnoredForHitTest() const {
void RemoteFrame::UpdateHitTestOcclusionData() { void RemoteFrame::UpdateHitTestOcclusionData() {
if (!cc_layer_ || !is_surface_layer_) if (!cc_layer_ || !is_surface_layer_)
return; return;
// If the parent LocalFrameView is render throttled, we may have stale layout
// information, so do nothing.
LocalFrameView* parent_view = View() ? View()->ParentFrameView() : nullptr;
if (!parent_view || parent_view->CanThrottleRendering())
return;
CHECK(!parent_view->NeedsLayout());
bool unoccluded = false; bool unoccluded = false;
if (base::FeatureList::IsEnabled( if (base::FeatureList::IsEnabled(
blink::features::kVizHitTestOcclusionCheck)) { blink::features::kVizHitTestOcclusionCheck)) {
......
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