Commit 0b76c5a0 authored by Khushal's avatar Khushal Committed by Commit Bot

cc: Skip crash dumps for PaintCache failures on SkTextBlobs.

This seems to be a majority of the failures for invalid deserialization
errors with PaintOpBuffers and its unclear whether this is just fallout
from failure to deserialize an inlined SkTextBlob or a caching error.

Skip performing a crash dump for the cache error cases to make this
clearer.

R=ericrk@chromium.org

Bug: 1019634
Change-Id: Ia882b918dc0630a89c7507fb0154f6fb08ee0087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2001584
Auto-Submit: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732588}
parent a6005f02
......@@ -428,7 +428,8 @@ void PaintOpReader::Read(sk_sp<SkTextBlob>* blob) {
if (data_bytes == 0u) {
auto cached_blob = options_.paint_cache->GetTextBlob(blob_id);
if (!cached_blob) {
SetInvalid();
// TODO(khushalsagar): Temporary for debugging crbug.com/1019634.
SetInvalid(true /* skip_crash_dump*/);
return;
}
......@@ -645,8 +646,9 @@ void PaintOpReader::AlignMemory(size_t alignment) {
}
// Don't inline this function so that crash reports can show the caller.
NOINLINE void PaintOpReader::SetInvalid() {
if (valid_ && options_.crash_dump_on_failure && base::RandInt(1, 10) == 1) {
NOINLINE void PaintOpReader::SetInvalid(bool skip_crash_dump) {
if (!skip_crash_dump && valid_ && options_.crash_dump_on_failure &&
base::RandInt(1, 10) == 1) {
base::debug::DumpWithoutCrashing();
}
valid_ = false;
......
......@@ -114,7 +114,7 @@ class CC_PAINT_EXPORT PaintOpReader {
template <typename T>
void ReadFlattenable(sk_sp<T>* val);
void SetInvalid();
void SetInvalid(bool skip_crash_dump = false);
// The main entry point is Read(sk_sp<PaintFilter>* filter) which calls one of
// the following functions depending on read type.
......
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