Skip to content

Commit 0fe68fe

Browse files
committed
fix(BrowserAccountStorage): Use setEntry instead of changeEntry
to reduce memory pressure Signed-off-by: Marcel Klehr <[email protected]>
1 parent c069b1f commit 0fe68fe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/browser/BrowserAccountStorage.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ export default class BrowserAccountStorage {
128128
}
129129

130130
async initCache() {
131-
await BrowserAccountStorage.changeEntry(
131+
await BrowserAccountStorage.setEntry(
132132
`bookmarks[${this.accountId}].cache`,
133-
() => ({})
133+
{}
134134
)
135135
}
136136

@@ -144,9 +144,9 @@ export default class BrowserAccountStorage {
144144
}
145145

146146
async setCache(data) {
147-
await BrowserAccountStorage.changeEntry(
147+
await BrowserAccountStorage.setEntry(
148148
`bookmarks[${this.accountId}].cache`,
149-
() => data
149+
data
150150
)
151151
}
152152

@@ -157,9 +157,9 @@ export default class BrowserAccountStorage {
157157
}
158158

159159
async initMappings() {
160-
await BrowserAccountStorage.changeEntry(
160+
await BrowserAccountStorage.setEntry(
161161
`bookmarks[${this.accountId}].mappings`,
162-
() => ({})
162+
{}
163163
)
164164
}
165165

@@ -185,9 +185,9 @@ export default class BrowserAccountStorage {
185185
}
186186

187187
async setMappings(data) {
188-
await BrowserAccountStorage.changeEntry(
188+
await BrowserAccountStorage.setEntry(
189189
`bookmarks[${this.accountId}].mappings`,
190-
() => data
190+
data
191191
)
192192
}
193193

0 commit comments

Comments
 (0)