Commit 26228375 authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

cc: Drop skip debug border that's too big

Some debug border are sized to the size of a layer which can be
arbitrarily large. It will fail deserialization if the area overflows
int. Simply drop these borders to avoid renderer being killed.

Bug: 1066139
Change-Id: Ie51e327383fd594ac5cb551a94b945f9645fa7f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134187Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755877}
parent aad376e2
......@@ -258,6 +258,12 @@ void LayerImpl::AppendDebugBorderQuad(
if (!ShowDebugBorders(DebugBorderType::LAYER))
return;
// This is the debug border quad layer size. The mojo serialization will fail
// if the area overflows, so just drop this debug border quad in that case to
// avoid crashes.
if (!quad_rect.size().GetCheckedArea().IsValid())
return;
gfx::Rect visible_quad_rect(quad_rect);
auto* debug_border_quad =
render_pass->CreateAndAppendDrawQuad<viz::DebugBorderDrawQuad>();
......
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