From: Cheng Zhao Date: Fri, 24 Jun 2016 02:21:32 +0000 (+0900) Subject: Remove callbackId when callback is removed from registry X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f792b6c752fbe0d8e9b35afc7de6a14aba5dcc41;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Remove callbackId when callback is removed from registry --- diff --git a/lib/common/api/callbacks-registry.js b/lib/common/api/callbacks-registry.js index 7a9bf53..459c392 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] + } } }