Resolve the problem of functions exceeding 50 lines in length

This commit is contained in:
zhangwentao 2024-07-30 17:22:07 +08:00
parent 409cd0b8b5
commit ee34fa3b7c

View File

@ -87,7 +87,6 @@ private:
napi_value OnCreateSystemHspModuleResourceManager(napi_env env, NapiCallbackInfo& info);
napi_value OnCreateModuleResourceManager(napi_env env, NapiCallbackInfo& info);
bool CheckCallerIsSystemApp();
void BindPropertiesAndFunctions(napi_env env, napi_value object, const char* moduleName, std::make_unique<JsBaseContext> jsContext);
};
void JsBaseContext::Finalizer(napi_env env, void* data, void* hint)
@ -713,7 +712,7 @@ napi_value AttachApplicationContext(napi_env env, void* value, void* hint)
return contextObj;
}
void JsBaseContext::BindPropertiesAndFunctions(napi_env env, napi_value object, const char* moduleName, std::make_unique<JsBaseContext> jsContext){
void BindPropertiesAndFunctions(napi_env env, napi_value object, const char* moduleName, std::make_unique<JsBaseContext> jsContext){
BindNativeProperty(env, object, "cacheDir", JsBaseContext::GetCacheDir);
BindNativeProperty(env, object, "tempDir", JsBaseContext::GetTempDir);