Bug 1960313: Stop throwing unneeded notification for stale credit card entry notifications r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D250037
This commit is contained in:
committed by
sfriedberger@mozilla.com
parent
27594c2ac5
commit
0f1118935f
@@ -366,11 +366,6 @@ add_task(async function test_notifyUsed() {
|
||||
getSyncChangeCounter(profileStorage.addresses, guid),
|
||||
changeCounter
|
||||
);
|
||||
|
||||
Assert.throws(
|
||||
() => profileStorage.addresses.notifyUsed("INVALID_GUID"),
|
||||
/No matching record\./
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function test_remove() {
|
||||
|
||||
@@ -469,11 +469,6 @@ add_task(async function test_notifyUsed() {
|
||||
|
||||
Assert.equal(creditCard.timesUsed, timesUsed + 1);
|
||||
Assert.notEqual(creditCard.timeLastUsed, timeLastUsed);
|
||||
|
||||
Assert.throws(
|
||||
() => profileStorage.creditCards.notifyUsed("INVALID_GUID"),
|
||||
/No matching record\./
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function test_remove() {
|
||||
|
||||
@@ -539,7 +539,9 @@ class AutofillRecords {
|
||||
|
||||
let recordFound = this._findByGUID(guid);
|
||||
if (!recordFound) {
|
||||
throw new Error("No matching record.");
|
||||
// record must have been deleted, nothing to update
|
||||
this.log.debug("Cannot notify. No record found with guid:", guid);
|
||||
return;
|
||||
}
|
||||
|
||||
recordFound.timesUsed++;
|
||||
|
||||
Reference in New Issue
Block a user