diff --git a/native_engine/impl/ark/ark_native_engine.cpp b/native_engine/impl/ark/ark_native_engine.cpp index 3fad1ac373640d90e463251d467ec5caad7b44d8..d2998813bf7e1f31ac5bef9d95651534992457e7 100644 --- a/native_engine/impl/ark/ark_native_engine.cpp +++ b/native_engine/impl/ark/ark_native_engine.cpp @@ -455,9 +455,9 @@ ArkNativeEngine::ArkNativeEngine(NativeEngine* parent, EcmaVM* vm, const Local(this); Local global = JSNApi::GetGlobalObject(vm, context); global->Set(vm, StringRef::NewFromUtf8(vm, REQUIRE_NAPI_FUNCTION_NAME), - FunctionRef::New(vm, RequireNapiForCtxEnv, nullptr, requireData)); + FunctionRef::New(vm, context, RequireNapiForCtxEnv, nullptr, requireData)); global->Set(vm, StringRef::NewFromUtf8(vm, REQUIRE_NAPI_INTERNAL_NAME), - FunctionRef::New(vm, RequireInternal, nullptr, requireData)); + FunctionRef::New(vm, context, RequireInternal, nullptr, requireData)); InitWithoutUV(); // The VM scope callback is initialized during the construction of the root engine and is ignored in this context. @@ -609,7 +609,7 @@ int ArkNativeEngine::CheckAndGetModule( bool &isAppModule, Local &moduleName, NativeModule *&module, - Local exports, + Local &exports, std::string &errInfo) { #ifdef IOS_PLATFORM diff --git a/native_engine/impl/ark/ark_native_engine.h b/native_engine/impl/ark/ark_native_engine.h index 64838b4bfb575bdae42de788b45c9d08a3f522df..f67b4b787e2dc1c48cf55677aea37c1363a6b544 100644 --- a/native_engine/impl/ark/ark_native_engine.h +++ b/native_engine/impl/ark/ark_native_engine.h @@ -465,7 +465,7 @@ private: bool &isAppModule, Local &moduleName, NativeModule *&module, - Local exports, + Local &exports, std::string &errInfo ); Local LoadNativeModule(