Commit 3f3a4096 authored by Austin Tankiang's avatar Austin Tankiang Committed by Commit Bot

Handle canceled state in generate{Source,Destination}Message

Sometimes, the feedback panel tries to call generateSourceMessage for a
feedback panel with a cancelled state. This will fail, creating an empty
panel. Handle this case to prevent that from happening. It doesn't
really matter what gets returned in this case because the panel will not
be shown anyway.

Bug: 1015415
Change-Id: I599ec0e348c756d93b1a739dba6a239174eec3b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2009603
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733476}
parent 4030f52c
......@@ -358,6 +358,8 @@ class ProgressCenterPanel {
return info['source'] || item.message;
case 'error':
return item.message;
case 'canceled':
return '';
default:
assertNotReached();
break;
......@@ -383,6 +385,7 @@ class ProgressCenterPanel {
}
break;
case 'error':
case 'canceled':
break;
default:
assertNotReached();
......
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