Commit c9bffe25 authored by phillis's avatar phillis Committed by Commit Bot

DPWA: CHECK icon_manager_ for WebAppShortcutManager::GetShortcutInfoForApp

Add a CHECK for icon_manager_ before using it in |WebAppShortcutManager::
GetShortcutInfoForApp| to diagnose a crash in this function on MacOS.

Bug: 1113276
Change-Id: I55a00abd394c4b3baf0759751b922d0ba2a81f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354906
Commit-Queue: Phillis Tang <phillis@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798503}
parent cc36f3e3
......@@ -54,6 +54,9 @@ void WebAppShortcutManager::GetShortcutInfoForApp(
app->downloaded_icon_sizes(IconPurpose::ANY),
GetDesiredIconSizesForShortcut());
// Optimistic check to help debug low-frequency crash.
// TODO(crbug.com/1113276): Make this a DCHECK before hitting stable.
CHECK(icon_manager_);
if (!icon_sizes_in_px.empty()) {
icon_manager_->ReadIcons(app_id, IconPurpose::ANY, icon_sizes_in_px,
base::BindOnce(&WebAppShortcutManager::OnIconsRead,
......
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