Commit 14da6e08 authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

When computing download item icon, check if this.data is undefined

computeIcon_ can be called while this.data is still undefined, leading
to TypeErrors when interacting with the chrome://downloads page.

Bug: 917190
Change-Id: I4ef3fda1d53f3d9fbd9c80270594c6115b757bf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635434
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: default avatarDan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665969}
parent de766129
......@@ -244,6 +244,7 @@ cr.define('downloads', function() {
*/
computeIcon_: function() {
if (loadTimeData.getBoolean('requestsApVerdicts') &&
this.data &&
this.data.dangerType == downloads.DangerType.UNCOMMON_CONTENT) {
return 'cr:error';
}
......
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