Merge pull request #6857 from brave/object-registry
clear the storage for the webContentsId when the render view is deleted
This commit is contained in:
commit
fc57201406
1 changed files with 2 additions and 2 deletions
|
@ -27,8 +27,8 @@ class ObjectsRegistry {
|
||||||
if (!owner) {
|
if (!owner) {
|
||||||
owner = this.owners[webContentsId] = new Set()
|
owner = this.owners[webContentsId] = new Set()
|
||||||
// Clear the storage when webContents is reloaded/navigated.
|
// Clear the storage when webContents is reloaded/navigated.
|
||||||
webContents.once('render-view-deleted', (event, id) => {
|
webContents.once('render-view-deleted', () => {
|
||||||
this.clear(id)
|
this.clear(webContentsId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (!owner.has(id)) {
|
if (!owner.has(id)) {
|
||||||
|
|
Loading…
Reference in a new issue