mirror of
https://github.com/electron/electron.git
synced 2026-02-17 10:31:38 -05:00
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:
@@ -27,8 +27,8 @@ class ObjectsRegistry {
|
||||
if (!owner) {
|
||||
owner = this.owners[webContentsId] = new Set()
|
||||
// Clear the storage when webContents is reloaded/navigated.
|
||||
webContents.once('render-view-deleted', (event, id) => {
|
||||
this.clear(id)
|
||||
webContents.once('render-view-deleted', () => {
|
||||
this.clear(webContentsId)
|
||||
})
|
||||
}
|
||||
if (!owner.has(id)) {
|
||||
|
||||
Reference in New Issue
Block a user