Bug 1211780 - Don't try to use oldPasswordField if it's null. r=dolske, a=sylvestre
authorbyron jones <glob@mozilla.com>
Wed, 07 Oct 2015 11:16:07 +0530
changeset 296324 6d2260ddac363ce1a319c470f6f428356dfb5bbf
parent 296323 8dc067c112dc12941188a5a5ba68565102b40ea5
child 296325 3a692b89bd0961b5d9558d1fd0ca6c27e1ab189d
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, sylvestre
bugs1211780
milestone43.0a2
Bug 1211780 - Don't try to use oldPasswordField if it's null. r=dolske, a=sylvestre
toolkit/components/passwordmgr/LoginManagerContent.jsm
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -709,17 +709,18 @@ var LoginManagerContent = {
       } else {
         // Just assume that the 2nd password is the new password
         oldPasswordField = pwFields[0].element;
         newPasswordField = pwFields[1].element;
       }
     }
 
     log("Password field (new) id/name is: ", newPasswordField.id, " / ", newPasswordField.name);
-    log("Password field (old) id/name is: ", oldPasswordField.id, " / ", oldPasswordField.name);
+    if (oldPasswordField)
+      log("Password field (old) id/name is: ", oldPasswordField.id, " / ", oldPasswordField.name);
     return [usernameField, newPasswordField, oldPasswordField];
   },
 
 
   /**
    * @return true if the page requests autocomplete be disabled for the
    *              specified element.
    */