From ed3ec8ef393ec5d16e9e7cdb46a31ac55fa2102b Mon Sep 17 00:00:00 2001 From: Brandon <36675220+BrandonTreston@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:56:14 -0500 Subject: [PATCH] [PM-11332] Prevent dead object error in Firefox due to timing issue (#10720) * Prevent dead object error from race condition when closing the popup in Firefox * Add await to async call to resolve timing issue * Remove comment --- apps/browser/src/autofill/services/autofill.service.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/browser/src/autofill/services/autofill.service.ts b/apps/browser/src/autofill/services/autofill.service.ts index 696bdb8b89..e79f6f69a3 100644 --- a/apps/browser/src/autofill/services/autofill.service.ts +++ b/apps/browser/src/autofill/services/autofill.service.ts @@ -436,9 +436,7 @@ export default class AutofillService implements AutofillServiceInterface { didAutofill = true; if (!options.skipLastUsed) { - // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling. - // eslint-disable-next-line @typescript-eslint/no-floating-promises - this.cipherService.updateLastUsedDate(options.cipher.id); + await this.cipherService.updateLastUsedDate(options.cipher.id); } // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.