mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2025-02-18 14:18:54 +00:00
!716 【问题修复】将uv_queue_work中的napi_value定义移动到napi_handle_scope包裹的范围内
Merge pull request !716 from Hollokin/master
This commit is contained in:
commit
b5f3133d70
@ -100,7 +100,6 @@ void PanelListenerImpl::OnPanelStatus(uint32_t windowId, bool isShow)
|
||||
uv_queue_work(
|
||||
loop, work, [](uv_work_t *work) {},
|
||||
[](uv_work_t *work, int status) {
|
||||
napi_value callback = nullptr;
|
||||
std::shared_ptr<UvEntry> entry(static_cast<UvEntry *>(work->data), [work](UvEntry *data) {
|
||||
delete data;
|
||||
delete work;
|
||||
@ -108,6 +107,7 @@ void PanelListenerImpl::OnPanelStatus(uint32_t windowId, bool isShow)
|
||||
CHECK_RETURN_VOID(entry != nullptr, "OnInputStart:: entry is null.");
|
||||
napi_handle_scope scope = nullptr;
|
||||
napi_open_handle_scope(entry->cbCopy->env_, &scope);
|
||||
napi_value callback = nullptr;
|
||||
napi_get_reference_value(entry->cbCopy->env_, entry->cbCopy->callback_, &callback);
|
||||
if (callback != nullptr) {
|
||||
napi_value global = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user