From 3b11bf5e41424fa46eb07835f74c17f3753d5a2e Mon Sep 17 00:00:00 2001 From: bridiver Date: Mon, 15 Aug 2016 21:52:16 -0700 Subject: [PATCH] clear the storage for the webContentsId when the render view is deleted --- lib/browser/objects-registry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/browser/objects-registry.js b/lib/browser/objects-registry.js index adbf6835554c..1917c65e6558 100644 --- a/lib/browser/objects-registry.js +++ b/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)) {