Bug 897052 - Null check acForm to avoid JS exceptions; r=MattN
authorJustin Dolske <dolske@mozilla.com>
Tue, 23 Jul 2013 19:48:00 +0100
changeset 152312 a0db0e58b50932f942459a38b60ec6bb96dc6eb6
parent 152311 c4bfe6f1d6a4d7d0d0ebce79ac6584405be39b3d
child 152313 eadbd2a913cb0c136535c6ac0944dca990fce4b1
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs897052
milestone25.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 897052 - Null check acForm to avoid JS exceptions; r=MattN
toolkit/components/passwordmgr/LoginManagerContent.jsm
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -123,16 +123,18 @@ var LoginManagerContent = {
         // This is probably a bit over-conservatative.
         if (!(acInputField.ownerDocument instanceof Ci.nsIDOMHTMLDocument))
             return;
 
         if (!this._isUsernameFieldType(acInputField))
             return;
 
         var acForm = acInputField.form;
+        if (!acForm)
+            return;
 
         // If the username is blank, bail out now -- we don't want
         // fillForm() to try filling in a login without a username
         // to filter on (bug 471906).
         if (!acInputField.value)
             return;
 
         log("onUsernameInput from", event.type);