@@ -50,7 +50,10 @@ class ObjectsRegistry {
this.dereference(id)
// Also remove the reference in owner.
- this.owners[webContentsId].delete(id)
+ let owner = this.owners[webContentsId]
+ if (owner) {
+ owner.delete(id)
+ }
}
// Clear all references to objects refrenced by the WebContents.