summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/lib/ActivityStreamStorage.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/newtab/lib/ActivityStreamStorage.sys.mjs')
-rw-r--r--browser/components/newtab/lib/ActivityStreamStorage.sys.mjs9
1 files changed, 8 insertions, 1 deletions
diff --git a/browser/components/newtab/lib/ActivityStreamStorage.sys.mjs b/browser/components/newtab/lib/ActivityStreamStorage.sys.mjs
index 1e128ec3f2..22a1dea2a9 100644
--- a/browser/components/newtab/lib/ActivityStreamStorage.sys.mjs
+++ b/browser/components/newtab/lib/ActivityStreamStorage.sys.mjs
@@ -38,6 +38,7 @@ export class ActivityStreamStorage {
return {
get: this._get.bind(this, storeName),
getAll: this._getAll.bind(this, storeName),
+ getAllKeys: this._getAllKeys.bind(this, storeName),
set: this._set.bind(this, storeName),
};
}
@@ -61,6 +62,12 @@ export class ActivityStreamStorage {
);
}
+ _getAllKeys(storeName) {
+ return this._requestWrapper(async () =>
+ (await this._getStore(storeName)).getAllKeys()
+ );
+ }
+
_set(storeName, key, value) {
return this._requestWrapper(async () =>
(await this._getStore(storeName)).put(value, key)
@@ -68,7 +75,7 @@ export class ActivityStreamStorage {
}
_openDatabase() {
- return lazy.IndexedDB.open(this.dbName, { version: this.dbVersion }, db => {
+ return lazy.IndexedDB.open(this.dbName, this.dbVersion, db => {
// If provided with array of objectStore names we need to create all the
// individual stores
this.storeNames.forEach(store => {