diff --git a/frameworks/native/runtime/js_worker.cpp b/frameworks/native/runtime/js_worker.cpp index 709be4dc30..e3fc12ab75 100644 --- a/frameworks/native/runtime/js_worker.cpp +++ b/frameworks/native/runtime/js_worker.cpp @@ -43,6 +43,7 @@ #include "js_runtime_utils.h" #include "native_engine/impl/ark/ark_native_engine.h" #include "commonlibrary/ets_utils/js_sys_module/console/console.h" +#include "syscap_ts.h" #ifdef SUPPORT_SCREEN using OHOS::Ace::ContainerScope; #endif @@ -88,6 +89,7 @@ void InitWorkerFunc(NativeEngine* nativeEngine) } OHOS::JsSysModule::Console::InitConsoleModule(reinterpret_cast(nativeEngine)); + InitSyscapModule(reinterpret_cast(nativeEngine), globalObj); #ifdef SUPPORT_SCREEN OHOS::Ace::DeclarativeModulePreloader::PreloadWorker(*nativeEngine); #endif diff --git a/interfaces/inner_api/runtime/BUILD.gn b/interfaces/inner_api/runtime/BUILD.gn index 0e7aa46c6c..58fdcebe4e 100644 --- a/interfaces/inner_api/runtime/BUILD.gn +++ b/interfaces/inner_api/runtime/BUILD.gn @@ -116,6 +116,7 @@ ohos_shared_library("runtime") { "resource_management:global_resmgr", "samgr:samgr_proxy", "zlib:shared_libz", + "init:syscap_ts", ] if (cj_frontend) {