diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs')
-rw-r--r-- | toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs b/toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs index ace6e16c2c..62493e3b07 100644 --- a/toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs +++ b/toolkit/components/extensions/ExtensionStorageSyncKinto.sys.mjs @@ -32,6 +32,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; import { ExtensionUtils } from "resource://gre/modules/ExtensionUtils.sys.mjs"; +/** @type {Lazy} */ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { @@ -120,11 +121,6 @@ function throwIfNoFxA(fxAccounts, action) { } } -// Global ExtensionStorageSyncKinto instance that extensions and Fx Sync use. -// On Android, because there's no FXAccounts instance, any syncing -// operations will fail. -export var extensionStorageSyncKinto = null; - /** * Utility function to enforce an order of fields when computing an HMAC. * @@ -558,6 +554,8 @@ class CryptoCollection { * "characters" are values, each within [0, 255]. You can produce * such a bytestring using e.g. CommonUtils.encodeUTF8. * + * @typedef {string} bytestring + * * The returned value is a base64url-encoded string of the hash. * * @param {bytestring} value The value to be hashed. @@ -696,7 +694,7 @@ let CollectionKeyEncryptionRemoteTransformer = class extends EncryptionRemoteTra * * @param {Extension} extension * The extension whose context just ended. - * @param {Context} context + * @param {BaseContext} context * The context that just ended. */ function cleanUpForContext(extension, context) { @@ -1199,7 +1197,7 @@ export class ExtensionStorageSyncKinto { * @param {Extension} extension * The extension for which we are seeking * a collection. - * @param {Context} context + * @param {BaseContext} context * The context of the extension, so that we can * stop syncing the collection when the extension ends. * @returns {Promise<Collection>} @@ -1370,7 +1368,14 @@ export class ExtensionStorageSyncKinto { } } -extensionStorageSyncKinto = new ExtensionStorageSyncKinto(_fxaService); +/** + * Global ExtensionStorageSyncKinto instance that extensions and Fx Sync use. + * On Android, because there's no FXAccounts instance, any syncing + * operations will fail. + */ +export const extensionStorageSyncKinto = new ExtensionStorageSyncKinto( + _fxaService +); // For test use only. export const KintoStorageTestUtils = { |