未验证 提交 31a5e9d4 编写于 作者: O openharmony_ci 提交者: Gitee

!9916 【包管理子系统】【monthly0815】优化native用例

Merge pull request !9916 from ry/cherry-pick-1693222354
...@@ -30,6 +30,8 @@ static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info inf ...@@ -30,6 +30,8 @@ static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info inf
napi_value fingerprint; napi_value fingerprint;
napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint); napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint);
napi_set_named_property(env, result, "fingerprint", fingerprint); napi_set_named_property(env, result, "fingerprint", fingerprint);
free(nativeApplicationInfo.bundleName);
free(nativeApplicationInfo.fingerprint);
return result; return result;
} }
......
...@@ -30,6 +30,8 @@ static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info inf ...@@ -30,6 +30,8 @@ static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info inf
napi_value fingerprint; napi_value fingerprint;
napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint); napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint);
napi_set_named_property(env, result, "fingerprint", fingerprint); napi_set_named_property(env, result, "fingerprint", fingerprint);
free(nativeApplicationInfo.bundleName);
free(nativeApplicationInfo.fingerprint);
return result; return result;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册