提交 1fd61c0d 编写于 作者: I inter515

优化native用例

Signed-off-by: Ninter515 <ry.renyi@huawei.com>
上级 31f9eb99
......@@ -30,6 +30,8 @@ static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info inf
napi_value fingerprint;
napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint);
napi_set_named_property(env, result, "fingerprint", fingerprint);
free(nativeApplicationInfo.bundleName);
free(nativeApplicationInfo.fingerprint);
return result;
}
......
......@@ -30,6 +30,8 @@ static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info inf
napi_value fingerprint;
napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint);
napi_set_named_property(env, result, "fingerprint", fingerprint);
free(nativeApplicationInfo.bundleName);
free(nativeApplicationInfo.fingerprint);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册