Backed out changeset 408920c5296e (bug 1532098) as per request. a=backout
authorCsoregi Natalia <ncsoregi@mozilla.com>
Sat, 09 Mar 2019 00:30:30 +0200
changeset 516322 d5a11a79f7bdfa73a6033e5198ae48c07791a4f7
parent 516321 408920c5296e7f8e39ff3507d7fd903a5c0fade0
child 516323 f83ccafddfa29dc1b510d0d0d0803aac105b03b3
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)
reviewersbackout
bugs1532098
milestone66.0
backs out408920c5296e7f8e39ff3507d7fd903a5c0fade0
Backed out changeset 408920c5296e (bug 1532098) as per request. a=backout
mobile/android/chrome/content/aboutLogins.js
--- a/mobile/android/chrome/content/aboutLogins.js
+++ b/mobile/android/chrome/content/aboutLogins.js
@@ -288,28 +288,22 @@ var Logins = {
         this._showList();
         return;
       }
 
       let logins = Services.logins.findLogins({}, origDomain, origDomain, null);
 
       for (let i = 0; i < logins.length; i++) {
         if (logins[i].username == origUsername) {
-          let propBag = Cc["@mozilla.org/hash-property-bag;1"].
-            createInstance(Ci.nsIWritablePropertyBag);
-          if (newUsername !== origUsername) {
-            propBag.setProperty("username", newUsername);
-          }
-          if (newPassword !== origPassword) {
-            propBag.setProperty("password", newPassword);
-          }
-          if (newDomain !== origDomain) {
-            propBag.setProperty("hostname", newDomain);
-          }
-          Services.logins.modifyLogin(logins[i], propBag);
+          let clone = logins[i].clone();
+          clone.username = newUsername;
+          clone.password = newPassword;
+          clone.hostname = newDomain;
+          Services.logins.removeLogin(logins[i]);
+          Services.logins.addLogin(clone);
           break;
         }
       }
     } catch (e) {
       Snackbars.show(gStringBundle.GetStringFromName("editLogin.couldNotSave"), Snackbars.LENGTH_LONG);
       return;
     }
     Snackbars.show(gStringBundle.GetStringFromName("editLogin.saved1"), Snackbars.LENGTH_LONG);