From 103eda519e508192c91cea92d0bb45aacdd8be3e Mon Sep 17 00:00:00 2001 From: lee Date: Thu, 6 Apr 2023 11:51:40 +0800 Subject: [PATCH] fixed 1b05b8c from https://gitee.com/lilong32/communication_bluetooth/pulls/728 modify EventNotify multi-thread issue Signed-off-by: lee --- frameworks/js/napi/src/napi_bluetooth_event.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/frameworks/js/napi/src/napi_bluetooth_event.cpp b/frameworks/js/napi/src/napi_bluetooth_event.cpp index 964e4d6b..43662d1a 100644 --- a/frameworks/js/napi/src/napi_bluetooth_event.cpp +++ b/frameworks/js/napi/src/napi_bluetooth_event.cpp @@ -36,13 +36,6 @@ void NapiEvent::EventNotify(AsyncEventData *asyncEvent) asyncEvent = nullptr; return; } - - napi_value callback = nullptr; - napi_status status = napi_get_reference_value(asyncEvent->env_, asyncEvent->callback_, &callback); - if (status != napi_ok || callback == nullptr) { - HILOGI("reference_value is null."); - return; - } uint32_t refCount = INVALID_REF_COUNT; napi_reference_ref(asyncEvent->env_, asyncEvent->callback_, &refCount); HILOGI("increments the reference count, refCount: %{public}d", refCount); -- Gitee