From 0d24563296a5a53712fe72c8995a1322fd5b4121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 25 Oct 2022 04:47:08 +0200 Subject: [PATCH] gdm/util: Do not handle fingerprint async errors in call It's better to do this at caller level so that we have more control of what to do on errors. Part-of: --- js/gdm/util.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/js/gdm/util.js b/js/gdm/util.js index 36a63da76..6731200f6 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -170,7 +170,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._userName = userName; this.reauthenticating = false; - this._checkForFingerprintReader(); + this._checkForFingerprintReader().catch(logError); // If possible, reauthenticate an already running session, // so any session specific credentials get updated appropriately @@ -355,19 +355,17 @@ export class ShellUserVerifier extends Signals.EventEmitter { return; } - try { - const [device] = await this._fprintManager.GetDefaultDeviceAsync( - Gio.DBusCallFlags.NONE, this._cancellable); - const fprintDeviceProxy = new FprintDeviceProxy(Gio.DBus.system, - 'net.reactivated.Fprint', - device); - const fprintDeviceType = fprintDeviceProxy['scan-type']; + const [device] = await this._fprintManager.GetDefaultDeviceAsync( + Gio.DBusCallFlags.NONE, this._cancellable); + const fprintDeviceProxy = new FprintDeviceProxy(Gio.DBus.system, + 'net.reactivated.Fprint', + device); + const fprintDeviceType = fprintDeviceProxy['scan-type']; - this._fingerprintReaderType = fprintDeviceType === 'swipe' - ? FingerprintReaderType.SWIPE - : FingerprintReaderType.PRESS; - this._updateDefaultService(); - } catch (e) {} + this._fingerprintReaderType = fprintDeviceType === 'swipe' + ? FingerprintReaderType.SWIPE + : FingerprintReaderType.PRESS; + this._updateDefaultService(); } _onCredentialManagerAuthenticated(credentialManager, _token) {