Guard against unexist owner when removing ref to remote object
This commit is contained in:
parent
aa29dc0c8a
commit
b5c1db9ad9
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,10 @@ class ObjectsRegistry {
|
||||||
this.dereference(id)
|
this.dereference(id)
|
||||||
|
|
||||||
// Also remove the reference in owner.
|
// 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.
|
// Clear all references to objects refrenced by the WebContents.
|
||||||
|
|
Loading…
Reference in a new issue