Bug 1520865 - Use the return value of Array.concat when building the list of nodes that are being localized before window.sizeToContent. r=Gijs
authorJared Wein <jwein@mozilla.com>
Thu, 17 Jan 2019 23:16:36 +0000
changeset 514450 188f7a851811
parent 514449 6c6fecd53382
child 514451 edc879d89731
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1520865
milestone66.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 1520865 - Use the return value of Array.concat when building the list of nodes that are being localized before window.sizeToContent. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D16887
security/manager/pki/resources/content/exceptionDialog.js
--- a/security/manager/pki/resources/content/exceptionDialog.js
+++ b/security/manager/pki/resources/content/exceptionDialog.js
@@ -35,27 +35,27 @@ function initExceptionDialog() {
       // We were pre-seeded with a location.
       document.getElementById("locationTextBox").value = args[0].location;
       document.getElementById("checkCertButton").disabled = false;
 
       if (args[0].securityInfo) {
         gSecInfo = args[0].securityInfo;
         gCert = gSecInfo.serverCert;
         gBroken = true;
-        l10nUpdatedElements.concat(updateCertStatus());
+        l10nUpdatedElements = l10nUpdatedElements.concat(updateCertStatus());
       } else if (args[0].prefetchCert) {
         // We can optionally pre-fetch the certificate too.  Don't do this
         // synchronously, since it would prevent the window from appearing
         // until the fetch is completed, which could be multiple seconds.
         // Instead, let's use a timer to spawn the actual fetch, but update
         // the dialog to "checking..." state right away, so that the UI
         // is appropriately responsive.  Bug 453855
         document.getElementById("checkCertButton").disabled = true;
         gChecking = true;
-        l10nUpdatedElements.concat(updateCertStatus());
+        l10nUpdatedElements = l10nUpdatedElements.concat(updateCertStatus());
 
         window.setTimeout(checkCert, 0);
       }
     }
 
     // Set out parameter to false by default
     args[0].exceptionAdded = false;
   }
@@ -114,17 +114,18 @@ async function checkCert() {
   if (uri) {
     let req = new XMLHttpRequest();
     req.open("GET", uri.prePath);
     req.onerror = grabCert.bind(this, req);
     req.onload = grabCert.bind(this, req);
     req.send(null);
   } else {
     gChecking = false;
-    document.l10n.translateElements(updateCertStatus()).then(() => window.sizeToContent());
+    await document.l10n.translateElements(updateCertStatus());
+    window.sizeToContent();
   }
 }
 
 /**
  * Build and return a URI, based on the information supplied in the
  * Certificate Location fields
  *
  * @returns {nsIURI}