Commit e6f39cd1 authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

Fix a crash in ScrollingCoordinator

In a previous CL: https://chromium-review.googlesource.com/c/581907, when
we access to the |composited_layer| inside the for loop, we didn't
perform any null check, and that's causing crash. This CL adds the null
check.

NOTRY=true

Bug: 751389
Change-Id: I5a0861d416b017af5c51ea82ce3add032b0b2316
Reviewed-on: https://chromium-review.googlesource.com/598123
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491483}
parent f32760a0
......@@ -779,10 +779,12 @@ void ScrollingCoordinator::SetTouchEventTargetRects(
layers_with_touch_rects_.clear();
for (const auto& layer_rect : layer_rects) {
if (!layer_rect.value.IsEmpty()) {
DCHECK(layer_rect.key->IsRootLayer() || layer_rect.key->Parent());
const PaintLayer* composited_layer =
layer_rect.key
->EnclosingLayerForPaintInvalidationCrossingFrameBoundaries();
DCHECK(composited_layer);
if (!composited_layer)
continue;
layers_with_touch_rects_.insert(composited_layer);
GraphicsLayer* main_graphics_layer =
composited_layer->GraphicsLayerBacking(
......
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