* verifying the signature of the bypass list within the database. * * If the signature in the database is invalid, the database will be wiped * and the stored dump will be used, until the settings next update. * * Note that this may cause a network check of the certificate, but that * should generally be quick. * * @param {boolean} [firstTime] * Internal boolean to indicate if this is the first time check or not. * @returns {Array} * An array of objects in the database, or an empty array if none * could be obtained. */ async #getFallbackDomains(firstTime = true) { let result = []; try { result = await this.#fallbackDomains.get({ verifySignature: true, }); } catch (ex) { if ( ex instanceof lazy.RemoteSettingsClient.InvalidSignatureError && firstTime ) { // The local database is invalid, try and reset it. await this.#fallbackDomains.db.clear(); // Now call this again. return this.#getFallbackDomains(false); } // Don't throw an error just log it, just continue with no data, and hopefully // a sync will fix things later on. console.error(ex); } return result; } } PK