From afc00b68851d3a9c1db7bab51a730974f544e058 Mon Sep 17 00:00:00 2001 From: Sergey Samarin Date: Wed, 25 Jun 2025 12:22:30 +0300 Subject: [PATCH] Fix crash in parallel gestures demo Signed-off-by: Sergey Samarin Change-Id: If128ebc97ff3e8d77b6816994d63cfd0afb14796 --- .../native/implementation/common_method_modifier.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp b/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp index fc81310c778..ea50f385ee3 100644 --- a/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp +++ b/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp @@ -4737,12 +4737,6 @@ void OnGestureRecognizerJudgeBegin1Impl(Ark_NativePointer node, auto arkValOthers = holderOthers.ArkValue(); auto resultOpt = callback.InvokeWithOptConvertResult(arkGestEvent, arkValCurrent, arkValOthers); - if (auto accessor = GetGestureRecognizerAccessor(); accessor) { - accessor->destroyPeer(arkValCurrent); - holderOthers.Release([accessor](Ark_GestureRecognizer& item) { - accessor->destroyPeer(item); - }); - } return resultOpt.value_or(defVal); }; auto convValue = Converter::OptConvertPtr(exposeInnerGesture); @@ -4775,12 +4769,6 @@ void ShouldBuiltInRecognizerParallelWithImpl(Ark_NativePointer node, auto arkValOthers = holderOthers.ArkValue(); auto resultOpt = callback.InvokeWithOptConvertResult, Ark_GestureRecognizer, Callback_GestureRecognizer_Void>(arkValCurrent, arkValOthers); - if (auto accessor = GetGestureRecognizerAccessor(); accessor) { - accessor->destroyPeer(arkValCurrent); - holderOthers.Release([accessor](Ark_GestureRecognizer& item) { - accessor->destroyPeer(item); - }); - } return resultOpt.value_or(nullptr); }; ViewAbstract::SetShouldBuiltInRecognizerParallelWith(frameNode, std::move(shouldBuiltInRecognizerParallelWithFunc)); -- Gitee