Merge pull request #6218 from electron/clean-up-callback-id

Remove callbackId when callback is removed from registry
This commit is contained in:
Cheng Zhao 2016-06-24 03:17:46 +00:00 committed by GitHub
commit 5826a8f9a9

View file

@ -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]
}
}
}