mirror of
https://github.com/openharmony/appexecfwk_standard.git
synced 2026-07-21 09:25:21 -04:00
fix core dump for innerbundleinfo on interface
Signed-off-by: longwei <longwei27@huawei.com> Change-Id: I7f09243c5cc037f6a69b9c72aff18f0a891b87a0
This commit is contained in:
@@ -500,13 +500,12 @@ static napi_value JSLauncherServiceOn(napi_env env, napi_callback_info info)
|
||||
napi_create_async_work(
|
||||
env, nullptr, resource,
|
||||
[](napi_env env, void* data) {
|
||||
},
|
||||
[](napi_env env, napi_status status, void* data) {
|
||||
AsyncHandleBundleContext* asyncCallbackInfo = (AsyncHandleBundleContext*)data;
|
||||
if (!asyncCallbackInfo->err) {
|
||||
asyncCallbackInfo->ret = InnerJSLauncherServiceOn(env, asyncCallbackInfo->bundleStatusCallback);
|
||||
}
|
||||
},
|
||||
[](napi_env env, napi_status status, void* data) {
|
||||
AsyncHandleBundleContext* asyncCallbackInfo = (AsyncHandleBundleContext*)data;
|
||||
napi_value result[2] = { 0 };
|
||||
// wrap result
|
||||
if (asyncCallbackInfo->err) {
|
||||
@@ -611,11 +610,12 @@ static napi_value JSLauncherServiceOff(napi_env env, napi_callback_info info)
|
||||
napi_create_async_work(
|
||||
env, nullptr, resource,
|
||||
[](napi_env env, void* data) {
|
||||
AsyncHandleBundleContext* asyncCallbackInfo = (AsyncHandleBundleContext*)data;
|
||||
asyncCallbackInfo->ret = InnerJSLauncherServiceOff();
|
||||
},
|
||||
[](napi_env env, napi_status status, void* data) {
|
||||
AsyncHandleBundleContext* asyncCallbackInfo = (AsyncHandleBundleContext*)data;
|
||||
if (!asyncCallbackInfo->err) {
|
||||
asyncCallbackInfo->ret = InnerJSLauncherServiceOff();
|
||||
}
|
||||
napi_value result[INDEX_TWO] = { 0 };
|
||||
if (asyncCallbackInfo->ret) {
|
||||
napi_create_uint32(env, 0, &result[0]);
|
||||
|
||||
Reference in New Issue
Block a user