Initialize properties in _init()
While we've always considered it good style to initialize JS properties, some code that relies on uninitialized properties having an implicit value of 'undefined' has slipped in over time. The updated SpiderMonkey version used by gjs now warns when accessing those properties, so we should make sure that they are properly initialized to avoid log spam, even though all warnings addressed here occur in conditionals that produce the correct result with 'undefined'. https://bugzilla.gnome.org/show_bug.cgi?id=781471
This commit is contained in:
@ -128,6 +128,9 @@ const ShellUserVerifier = new Lang.Class({
|
||||
|
||||
this._client = client;
|
||||
|
||||
this._defaultService = null;
|
||||
this._preemptingService = null;
|
||||
|
||||
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
||||
this._settings.connect('changed',
|
||||
Lang.bind(this, this._updateDefaultService));
|
||||
@ -140,6 +143,7 @@ const ShellUserVerifier = new Lang.Class({
|
||||
// at startup should result in immediately initiating authentication.
|
||||
// This is different than fingeprint readers, where we only check them
|
||||
// after a user has been picked.
|
||||
this.smartcardDetected = false;
|
||||
this._checkForSmartcard();
|
||||
|
||||
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
||||
|
Reference in New Issue
Block a user