fix filter nullptr

Signed-off-by: woohoa <wanghuan36@huawei.com>
This commit is contained in:
15950533375 2024-10-29 20:23:21 +08:00
parent ba1b080516
commit ba43d92b79
6 changed files with 6 additions and 8 deletions

View File

@ -33,7 +33,7 @@ public:
virtual ~AppDomainVerifyDataMgr();
/**
* @brief GetDeferredLink AppDomainVerify status.
* @brief Get AppDomainVerify status.
* @param bundleName Indicates the bundleName.
* @param verifyResultInfo output value.
* @return Returns true if this function is successfully called; returns false
@ -68,7 +68,7 @@ public:
bool DeleteVerifyStatus(const std::string& bundleName);
/**
* @brief GetDeferredLink all AppDomainVerify status.
* @brief Get all AppDomainVerify status.
* @return Returns verifyMap_ const ref
* otherwise.
*/

View File

@ -31,6 +31,6 @@ public:
};
std::shared_ptr<AbilityFilter> AbilityFilter::Create()
{
return std::shared_ptr<AbilityFilterImpl>();
return std::make_shared<AbilityFilterImpl>();
}
}

View File

@ -74,8 +74,6 @@ void DeferredLinkMgr::AgeCacheProcess()
std::unique_lock<std::mutex> lock(cachesMutex_);
int64_t now = GetSecondsSince1970ToNow();
caches_.remove_if([now](const DeferredLinkInfo& linkInfo) {
APP_DOMAIN_VERIFY_HILOGD(APP_DOMAIN_VERIFY_MGR_MODULE_SERVICE,
"url:%{public}s, now:%{public}lld, timestamp%{public}lld.", linkInfo.url.c_str(), now, linkInfo.timeStamp);
return now - linkInfo.timeStamp >= MAX_CACHE_TIME;
});
if (!caches_.empty()) {

View File

@ -334,7 +334,7 @@ int AppDomainVerifyMgrServiceProxy::GetDeferredLink(std::string& link)
AppDomainVerifyMgrInterfaceCode::GET_DEFERRED_LINK, data, reply, option);
if (error != ERR_NONE) {
APP_DOMAIN_VERIFY_HILOGE(
APP_DOMAIN_VERIFY_MGR_MODULE_CLIENT, "QueryAssociatedBundleNames failed, error: %d", error);
APP_DOMAIN_VERIFY_MGR_MODULE_CLIENT, "GetDeferredLink failed, error: %d", error);
}
int32_t result = reply.ReadInt32();
if (result != 0) {

View File

@ -1,4 +1,4 @@
# Copyright (C) 2023 Huawei Device Co., Ltd.
# Copyright (C) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Huawei Device Co., Ltd.
* Copyright (C) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at