diff --git a/frameworks/native/runtime/ohos_js_environment_impl.cpp b/frameworks/native/runtime/ohos_js_environment_impl.cpp index 6f77792c827d0a27dbb3adb6887609c4a1f2e805..7cfd7b5df9ff46997d5f9c88a551c921b3766c81 100644 --- a/frameworks/native/runtime/ohos_js_environment_impl.cpp +++ b/frameworks/native/runtime/ohos_js_environment_impl.cpp @@ -179,7 +179,7 @@ void OHOSJsEnvironmentImpl::InitWorkerModule(NativeEngine* engine, std::shared_p CHECK_POINTER(workerInfo); engine->SetInitWorkerFunc(InitWorkerFunc); engine->SetOffWorkerFunc(OffWorkerFunc); - engine->SetReleaseWorkerSafeMemFunc(ReleaseWorkerSafeMemFunc); + panda::JSNApi::SetReleaseSecureMemCallback(const_cast(engine->GetEcmaVm()), ReleaseWorkerSafeMemFunc); engine->SetGetAssetFunc(AssetHelper(workerInfo)); engine->SetApiVersion(static_cast(workerInfo->apiTargetVersion.GetOriginPointer()));