From 1b05b8c43294dcde0f100b09fcce1ac5fabc7ae6 Mon Sep 17 00:00:00 2001 From: lee Date: Thu, 6 Apr 2023 11:51:40 +0800 Subject: [PATCH] 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