mirror of
https://github.com/electron/electron.git
synced 2026-01-25 07:18:18 -05:00
Merge pull request #5233 from electron/remove-no-exception
Guard against unexist owner when removing ref to remote object
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user