指针参数去掉引用传递

Signed-off-by: XKK <huyingsong@huawei.com>
This commit is contained in:
XKK 2024-06-13 14:39:43 +08:00
parent 17723145b3
commit a1fb6ef9ef
6 changed files with 8 additions and 8 deletions

View File

@ -1461,7 +1461,7 @@ void JsRuntime::ReInitJsEnvImpl(const Options& options)
jsEnv_->ReInitJsEnvImpl(std::make_unique<OHOSJsEnvironmentImpl>(options.eventRunner));
}
void JsRuntime::SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate>& moduleCheckerDelegate) const
void JsRuntime::SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate) const
{
CHECK_POINTER(jsEnv_);
jsEnv_->SetModuleLoadChecker(moduleCheckerDelegate);

View File

@ -53,7 +53,7 @@ public:
void RegisterQuickFixQueryFunc(const std::map<std::string, std::string>& moduleAndPath) override {};
void StartProfiler(const DebugOption debugOption) override {};
void DoCleanWorkAfterStageCleaned() override {};
void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate>& moduleCheckerDelegate) const override {}
void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate) const override {}
void SetDeviceDisconnectCallback(const std::function<bool()> &cb) override {};
bool IsAppLibLoaded() const { return appLibLoaded_; }
void UnLoadCJAppLibrary();

View File

@ -123,7 +123,7 @@ public:
void ReloadFormComponent(); // Reload ArkTS-Card component
void DoCleanWorkAfterStageCleaned() override;
void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate>& moduleCheckerDelegate) const override;
void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate) const override;
static std::unique_ptr<NativeReference> LoadSystemModuleByEngine(napi_env env,
const std::string& moduleName, const napi_value* argv, size_t argc);

View File

@ -44,7 +44,7 @@ public:
std::string arkNativeFilePath;
std::string packagePathStr;
std::vector<std::string> assetBasePathStr;
std::shared_ptr<AppExecFwk::EventRunner> eventRunner;
std::shared_ptr<AppExecFwk::EventRunner> eventRunner = nullptr;
std::map<std::string, std::string> hapModulePath;
bool loadAce = true;
bool preload = false;
@ -59,7 +59,7 @@ public:
// ArkTsCard start
bool isUnique = false;
// ArkTsCard end
std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate;
std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate = nullptr;
int32_t apiTargetVersion = 0;
std::map<std::string, std::string> pkgContextInfoJsonStringMap;
std::map<std::string, std::string> packageNameList;
@ -103,7 +103,7 @@ public:
virtual void RegisterQuickFixQueryFunc(const std::map<std::string, std::string>& moduleAndPath) = 0;
virtual void StartProfiler(const DebugOption debugOption) = 0;
virtual void DoCleanWorkAfterStageCleaned() = 0;
virtual void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate>& moduleCheckerDelegate) const {}
virtual void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate) const {}
virtual void SetDeviceDisconnectCallback(const std::function<bool()> &cb) = 0;
virtual void UpdatePkgContextInfoJson(std::string moduleName, std::string hapPath, std::string packageName) = 0;
Runtime(const Runtime&) = delete;

View File

@ -325,7 +325,7 @@ void JsEnvironment::ReInitJsEnvImpl(std::unique_ptr<JsEnvironmentImpl> impl)
impl_ = std::move(impl);
}
void JsEnvironment::SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate>& moduleCheckerDelegate)
void JsEnvironment::SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate)
{
if (engine_ == nullptr) {
TAG_LOGE(AAFwkTag::JSENV, "Invalid native engine.");

View File

@ -102,7 +102,7 @@ public:
void ReInitJsEnvImpl(std::unique_ptr<JsEnvironmentImpl> impl);
void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate>& moduleCheckerDelegate);
void SetModuleLoadChecker(const std::shared_ptr<ModuleCheckerDelegate> moduleCheckerDelegate);
void SetRequestAotCallback(const RequestAotCallback& cb);