Bug 1388494 - Fix incomplete advisory info issue in about:blocked page. r=francois
authorHenry Chang <hchang@mozilla.com>
Fri, 11 Aug 2017 17:16:25 +0800
changeset 374884 653bbf8bc36ecc6c5773c7e6e01b50c7a17454e1
parent 374883 160d9f91df68d639b5cea60ae1fda667e274d7b1
child 374885 eb60d0337b16b4b5fc8fa7478899619aad34e653
push id48858
push userhchang@mozilla.com
push dateWed, 16 Aug 2017 02:03:47 +0000
treeherderautoland@eb60d0337b16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1388494
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1388494 - Fix incomplete advisory info issue in about:blocked page. r=francois MozReview-Commit-ID: 55umwAegujo
browser/base/content/blockedSite.xhtml
--- a/browser/base/content/blockedSite.xhtml
+++ b/browser/base/content/blockedSite.xhtml
@@ -129,18 +129,22 @@
           el = document.getElementById("errorTitleText_harmful");
           el.remove();
           el = document.getElementById("errorShortDescText_harmful");
           el.remove();
           el = document.getElementById("errorLongDescText_harmful");
           el.remove();
         }
 
-        // Set sitename
-        document.getElementById(error + "_sitename").textContent = getHostString();
+        // Set sitename if necessary.
+        let sitenameElem = document.getElementById(error + "_sitename");
+        if (sitenameElem) {
+          sitenameElem.textContent = getHostString();
+        }
+
         document.title = document.getElementById("errorTitleText_" + error)
                                  .innerHTML;
 
         if (!getOverride()) {
           var btn = document.getElementById("ignoreWarningButton");
           if (btn) {
             btn.remove();
           }