Bug 1333064 - Unblocked malware downloads are styled incorrectly in the Downloads Panel. r=mak draft
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Mon, 23 Jan 2017 15:53:15 +0100
changeset 464980 84bab265090eb4c16de102a4bb04c292583fc55e
parent 464954 36486fdc3813ef7943ae5b07b4128866d1938a6c
child 543061 52a5d713448b4f1851afaefe2ddef12648a7d3f0
push id42505
push userpaolo.mozmail@amadzone.org
push dateMon, 23 Jan 2017 14:54:24 +0000
reviewersmak
bugs1333064
milestone53.0a1
Bug 1333064 - Unblocked malware downloads are styled incorrectly in the Downloads Panel. r=mak MozReview-Commit-ID: IT4Dd9tBzt0
browser/components/downloads/DownloadsViewUI.jsm
--- a/browser/components/downloads/DownloadsViewUI.jsm
+++ b/browser/components/downloads/DownloadsViewUI.jsm
@@ -109,17 +109,17 @@ this.DownloadsViewUI.DownloadElementShel
    * update in order to improve performance.
    */
   _updateState() {
     this.element.setAttribute("displayName", this.displayName);
     this.element.setAttribute("image", this.image);
     this.element.setAttribute("state",
                               DownloadsCommon.stateOfDownload(this.download));
 
-    if (this.download.error &&
+    if (!this.download.succeeded && this.download.error &&
         this.download.error.becauseBlockedByReputationCheck) {
       this.element.setAttribute("verdict",
                                 this.download.error.reputationCheckVerdict);
     } else {
       this.element.removeAttribute("verdict");
     }
 
     // Since state changed, reset the time left estimation.