tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit c6e3b41d76869c0f5cf48e2fb894afd7539256ee
parent ba199a3da738aadd2cd5312643876c6fac473fa6
Author: Anna Kulyk <akulyk@mozilla.com>
Date:   Fri,  3 Oct 2025 15:15:19 +0000

Bug 1987527 - Part 2: Remove workaround for OS auth in Autofill section r=credential-management-reviewers,mkennedy,mtigley

Differential Revision: https://phabricator.services.mozilla.com/D267022

Diffstat:
Mtoolkit/components/formautofill/FormAutofillPreferences.sys.mjs | 19+++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/toolkit/components/formautofill/FormAutofillPreferences.sys.mjs b/toolkit/components/formautofill/FormAutofillPreferences.sys.mjs @@ -157,27 +157,18 @@ FormAutofillPreferences.prototype = { win.Preferences.addSetting({ id: "requireOSAuthForPayments", visible: () => lazy.OSKeyStore.canReauth(), - _pendingValue: null, - get() { - return this._pendingValue ?? FormAutofillUtils.getOSAuthEnabled(); - }, + get: () => FormAutofillUtils.getOSAuthEnabled(), async set(checked) { - this._pendingValue = checked; - win.Preferences.getSetting("requireOSAuthForPayments").emit("change"); + await FormAutofillPreferences.prototype.trySetOSAuthEnabled( + win, + checked + ); }, setup: emitChange => { Services.obs.addObserver(emitChange, "OSAuthEnabledChange"); return () => Services.obs.removeObserver(emitChange, "OSAuthEnabledChange"); }, - async onUserChange(checked, _, setting) { - await FormAutofillPreferences.prototype.trySetOSAuthEnabled( - win, - checked - ); - this._pendingValue = null; - setting.emit("change"); - }, }); let paymentsGroup = document.querySelector(