Commit d028c30a authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

IconLoadingPipeline: Allow for missing icons

When an app is newly uninstalled, we might attempt to read icons that
are no longer present.

This CL should avoid some flakes in browser tests, i.e.
[app_icon_factory.cc(956)] Check failed: it != icon_bitmaps.end().
https://bugs.chromium.org/p/chromium/issues/detail?id=1119807#c14

Bug: 1119807
Change-Id: I05d0c0c63f26f1106b9f4674f9be350eb5c3a530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454920Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Auto-Submit: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814577}
parent 0453fcb6
...@@ -953,7 +953,11 @@ void IconLoadingPipeline::OnReadWebAppIcon( ...@@ -953,7 +953,11 @@ void IconLoadingPipeline::OnReadWebAppIcon(
++it; ++it;
} }
DCHECK(it != icon_bitmaps.end()); if (it == icon_bitmaps.end()) {
MaybeApplyEffectsAndComplete(gfx::ImageSkia());
return;
}
SkBitmap bitmap = it->second; SkBitmap bitmap = it->second;
// Resize |bitmap| to match |icon_scale|. // Resize |bitmap| to match |icon_scale|.
......
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