KeyringController uses the #unsupportedKeyrings array to momentarily store keyrings that failed during restore/deserialization (the process of extracting a serialized keyring from the encrypted vault and deserializing it into a Keyring instance).
However, if the failure happens due to this line, the affected keyring can end up being both in the standard #keyrings array and the #unsupportedKeyrings one. This leads to subsequent duplication of keyrings when updating the vault, since the keyring would be in both the arrays.
The above linked line fails because of this constructor line, as we are assigning a frozen object to #keyringsMetadata
KeyringController uses the
#unsupportedKeyringsarray to momentarily store keyrings that failed during restore/deserialization (the process of extracting a serialized keyring from the encrypted vault and deserializing it into a Keyring instance).However, if the failure happens due to this line, the affected keyring can end up being both in the standard
#keyringsarray and the#unsupportedKeyringsone. This leads to subsequent duplication of keyrings when updating the vault, since the keyring would be in both the arrays.The above linked line fails because of this constructor line, as we are assigning a frozen object to
#keyringsMetadata