From f792b6c752fbe0d8e9b35afc7de6a14aba5dcc41 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 24 Jun 2016 11:21:32 +0900 Subject: [PATCH] Remove callbackId when callback is removed from registry --- lib/common/api/callbacks-registry.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/common/api/callbacks-registry.js b/lib/common/api/callbacks-registry.js index 7a9bf534f72d..459c392bc188 100644 --- a/lib/common/api/callbacks-registry.js +++ b/lib/common/api/callbacks-registry.js @@ -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] + } } }