This patch applies the following changes to the storage.local data migration behaviors:
- An about:config preference is set when an extension has been migrated successfully to the
storage.local IndexedDB backend (cleared automatically if the addon is uninstalled).
- If the above about:config preference is set, the storage.local IndexedDB backend is enabled
without attempting to open an IndexedDB connection for the new backend.
- While migrating an extension, if we fail to open the IndexedDB connection, the data migration
is cancelled and the storage.local API is going to fallback to the storage.local JSONFile backend
(until the next extension startup, when a new data migration is going to be tried).
- When a migration is completed successfully, the old JSONFile is renamed (by appending ".migrated"
to its original file name) instead of being removed.
MozReview-Commit-ID: LPM0fQUagTd
When ExtensionStorageIDB.selectBackend is called from a child process, it calls the main process
and cache the result as a promise, to be reused for the other contexts for the same extension
that are running in the same process.
The cached promise should not be tied to a particular extension context's cloneScope, otherwise
accessing it will raise "can't access dead object" errors after that cloneScope has been
destroyed.
MozReview-Commit-ID: GJuul8sQmlF
This patch defined a new ExtensionStorageIDB module, which provides the
same "internal" API currently provided by ExtensionStorage and uses
IndexedDB as its backend (instead of the JSONFile used as the backend
provided by ExtensionStorage).
MozReview-Commit-ID: DsvPudExcyr
This patch defined a new ExtensionStorageIDB module, which provides the
same "internal" API currently provided by ExtensionStorage and uses
IndexedDB as its backend (instead of the JSONFile used as the backend
provided by ExtensionStorage).
MozReview-Commit-ID: DsvPudExcyr