!48909 安全告警修复

Merge pull request !48909 from 邹林肯/ccxq
This commit is contained in:
openharmony_ci 2024-11-22 10:22:25 +00:00 committed by Gitee
commit 950fd59bc0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 8 additions and 9 deletions

View File

@ -3725,8 +3725,7 @@ void RosenRenderContext::FlushForegroundDrawFunction(CanvasDrawFunction&& foregr
CHECK_NULL_VOID(rsNode_);
CHECK_NULL_VOID(foregroundDraw);
rsNode_->DrawOnNode(Rosen::RSModifierType::FOREGROUND_STYLE,
[foregroundDraw = std::move(foregroundDraw)](std::shared_ptr<RSCanvas> canvas)
{
[foregroundDraw = std::move(foregroundDraw)](std::shared_ptr<RSCanvas> canvas) {
CHECK_NULL_VOID(canvas);
foregroundDraw(*canvas);
});

View File

@ -4893,7 +4893,7 @@ struct ArkUIFrameNodeModifier {
void (*freeCustomPropertyCharPtr)(char* value, ArkUI_Uint32 size);
ArkUINodeHandle (*getCurrentPageRootNode)(ArkUINodeHandle node);
ArkUI_Int32 (*getNodeTag)(ArkUINodeHandle node);
void (*getActiveChildrenInfo)(ArkUINodeHandle handle, ArkUINodeHandle** items, ArkUI_Uint32* size);
void (*getActiveChildrenInfo)(ArkUINodeHandle handle, ArkUINodeHandle** items, ArkUI_Int32* size);
void (*getCustomProperty)(ArkUINodeHandle node, ArkUI_CharPtr key, char** value);
};

View File

@ -562,7 +562,7 @@ ArkUI_Int32 GetNodeTag(ArkUINodeHandle node)
return uiNode->IsCNode();
}
void GetActiveChildrenInfo(ArkUINodeHandle handle, ArkUINodeHandle** items, ArkUI_Uint32* size)
void GetActiveChildrenInfo(ArkUINodeHandle handle, ArkUINodeHandle** items, ArkUI_Int32* size)
{
auto* frameNode = reinterpret_cast<FrameNode*>(handle);
CHECK_NULL_VOID(frameNode);

View File

@ -222,7 +222,7 @@ int32_t OH_ArkUI_NodeUtils_GetActiveChildrenInfo(ArkUI_NodeHandle head, ArkUI_Ac
const auto* impl = OHOS::Ace::NodeModel::GetFullImpl();
CHECK_NULL_RETURN(impl, ARKUI_ERROR_CODE_PARAM_INVALID);
ArkUINodeHandle* innerNodes = nullptr;
uint32_t totalSize = 0;
int32_t totalSize = 0;
impl->getNodeModifiers()->getFrameNodeModifier()->getActiveChildrenInfo(
head->uiNodeHandle, &innerNodes, &totalSize);
*handle = new ArkUI_ActiveChildrenInfo({ .nodeList = nullptr, .nodeCount = totalSize });
@ -344,7 +344,7 @@ void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle)
ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildrenInfo* handle, int32_t index)
{
CHECK_NULL_RETURN(handle, nullptr);
if (index < handle->nodeCount) {
if (index < handle->nodeCount && index >= 0) {
return handle->nodeList[index];
}
return nullptr;