Bug 1333064 - Unblocked malware downloads are styled incorrectly in the Downloads Panel. r=mak a=jcristau
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Mon, 23 Jan 2017 15:53:15 +0100
changeset 375760 0055af50eaefd44bf5f55745d17c0e86cc710d7d
parent 375759 d6e53354c0346bede591b876c97561f03b50ef9d
child 375761 8d73c486834d5f2dc25c584cb6610e19038f7251
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, jcristau
bugs1333064
milestone53.0a2
Bug 1333064 - Unblocked malware downloads are styled incorrectly in the Downloads Panel. r=mak a=jcristau 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.