Merge pull request #6218 from electron/clean-up-callback-id
Remove callbackId when callback is removed from registry
This commit is contained in:
commit
5826a8f9a9
1 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,11 @@ class CallbacksRegistry {
|
|||
}
|
||||
|
||||
remove (id) {
|
||||
return delete this.callbacks[id]
|
||||
const callback = this.callbacks[id]
|
||||
if (callback) {
|
||||
v8Util.deleteHiddenValue(callback, 'callbackId')
|
||||
delete this.callbacks[id]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue