Browse Source

clear the storage for the webContentsId when the render view is deleted

bridiver 8 years ago
parent
commit
3b11bf5e41
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/browser/objects-registry.js

+ 2 - 2
lib/browser/objects-registry.js

@@ -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)) {