低级稳定性问题整改

Signed-off-by: b30058220 <baodi1@huawei.com>
Change-Id: I830a8f1e462c01069dd5fa53f9f1e7a06c42bcf6
This commit is contained in:
b30058220 2024-08-23 08:46:17 +00:00
parent fe254629ff
commit 89b886910b

View File

@ -1555,6 +1555,8 @@ static napi_value JSExecuteDrag(napi_env env, napi_callback_info info)
if (!container) {
NapiThrow(env, "get container failed.", ERROR_CODE_INTERNAL_ERROR);
napi_close_escapable_handle_scope(env, scope);
delete dragAsyncContext;
dragAsyncContext = nullptr;
return nullptr;
}
if (CheckDragging(container)) {
@ -1568,8 +1570,6 @@ static napi_value JSExecuteDrag(napi_env env, napi_callback_info info)
if (!getPointSuccess) {
NapiThrow(env, "confirm current point info failed.", ERROR_CODE_INTERNAL_ERROR);
napi_escape_handle(env, scope, result, &result);
delete dragAsyncContext;
dragAsyncContext = nullptr;
napi_close_escapable_handle_scope(env, scope);
return result;
}