Bug 801630 - random cleanup in exception.js r=bnicholson
authorMark Finkle <mfinkle@mozilla.com>
Mon, 22 Oct 2012 18:10:17 -0400
changeset 111217 f2686a2cd826699d16eef33fa11f810dfc4a08cb
parent 111216 a1170e62ccd519d89585fd1e50bb50145a302f84
child 111218 c78126b314878b17affc0d25f4c152860a3f0149
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbnicholson
bugs801630
milestone19.0a1
Bug 801630 - random cleanup in exception.js r=bnicholson
mobile/android/chrome/content/exceptions.js
--- a/mobile/android/chrome/content/exceptions.js
+++ b/mobile/android/chrome/content/exceptions.js
@@ -44,19 +44,19 @@ SSLExceptions.prototype = {
 
   /**
     Attempt to download the certificate for the location specified to get the SSLState
     for the certificate and the errors.
    */
   _checkCert: function SSLE_checkCert(aURI) {
     this._sslStatus = null;
   
-    var req = new XMLHttpRequest();
+    let req = new XMLHttpRequest();
     try {
-      if(aURI) {
+      if (aURI) {
         req.open("GET", aURI.prePath, false);
         req.channel.notificationCallbacks = this;
         req.send(null);
       }
     } catch (e) {
       // We *expect* exceptions if there are problems with the certificate
       // presented by the site.  Log it, just in case, but we can proceed here,
       // with appropriate sanity checks
@@ -66,40 +66,40 @@ SSLExceptions.prototype = {
     }
 
     return this._sslStatus;
   },
 
   /**
     Internal method to create an override.
   */
-  _addOverride: function SSLE_addOverride(aURI, aWindow, temporary) {
-    var SSLStatus = this._checkCert(aURI);
-    var certificate = SSLStatus.serverCert;
+  _addOverride: function SSLE_addOverride(aURI, aWindow, aTemporary) {
+    let SSLStatus = this._checkCert(aURI);
+    let certificate = SSLStatus.serverCert;
 
-    var flags = 0;
+    let flags = 0;
 
     // in private browsing do not store exceptions permanently ever
     if (PrivateBrowsingUtils.isWindowPrivate(aWindow)) {
-      temporary = true;
+      aTemporary = true;
     }
 
-    if(SSLStatus.isUntrusted)
+    if (SSLStatus.isUntrusted)
       flags |= this._overrideService.ERROR_UNTRUSTED;
-    if(SSLStatus.isDomainMismatch)
+    if (SSLStatus.isDomainMismatch)
       flags |= this._overrideService.ERROR_MISMATCH;
-    if(SSLStatus.isNotValidAtThisTime)
+    if (SSLStatus.isNotValidAtThisTime)
       flags |= this._overrideService.ERROR_TIME;
 
     this._overrideService.rememberValidityOverride(
       aURI.asciiHost,
       aURI.port,
       certificate,
       flags,
-      temporary);
+      aTemporary);
   },
 
   /**
     Creates a permanent exception to override all overridable errors for
     the given URL.
   */
   addPermanentException: function SSLE_addPermanentException(aURI, aWindow) {
     this._addOverride(aURI, aWindow, false);