Commit 72046293 authored by Tien-Ren Chen's avatar Tien-Ren Chen Committed by Commit Bot

[Blink/SPv175] Early out GraphicsLayer::Paint when layer state is invalid

This is a band-aid for a null pointer crash when layer_state_ is accessed.
We don't know why a null state can ever happen, and there is no meaningful
fallback. This CL skips painting for the offending layer so at least it
won't crash.

BUG=853096

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I52ae41253440d6937909cc69f1711852fc4efd6b
Reviewed-on: https://chromium-review.googlesource.com/1105342Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568276}
parent 5bf3554a
...@@ -337,6 +337,13 @@ void GraphicsLayer::PaintRecursivelyInternal( ...@@ -337,6 +337,13 @@ void GraphicsLayer::PaintRecursivelyInternal(
bool GraphicsLayer::Paint(const IntRect* interest_rect, bool GraphicsLayer::Paint(const IntRect* interest_rect,
GraphicsContext::DisabledMode disabled_mode) { GraphicsContext::DisabledMode disabled_mode) {
#if !DCHECK_IS_ON()
// TODO(crbug.com/853096): Investigate why we can ever reach here without
// a valid layer state. Seems to only happen on Android builds.
if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled() && !layer_state_)
return false;
#endif
if (PaintWithoutCommit(interest_rect, disabled_mode)) if (PaintWithoutCommit(interest_rect, disabled_mode))
GetPaintController().CommitNewDisplayItems(); GetPaintController().CommitNewDisplayItems();
else if (!needs_check_raster_invalidation_) else if (!needs_check_raster_invalidation_)
......
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