From: Bartlomiej Grzelewski Date: Wed, 20 May 2020 15:10:13 +0000 (+0200) Subject: prevent from running endless loop X-Git-Tag: accepted/tizen/6.0/unified/20201030.104853^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F233954%2F1;p=platform%2Fupstream%2Fat-spi2-atk.git prevent from running endless loop Change-Id: I76a6115451adfd0d0a57215d57c6875e7531ee8e --- diff --git a/atk-adaptor/adaptors/accessible-adaptor.c b/atk-adaptor/adaptors/accessible-adaptor.c index 889e300..e17ab03 100644 --- a/atk-adaptor/adaptors/accessible-adaptor.c +++ b/atk-adaptor/adaptors/accessible-adaptor.c @@ -247,6 +247,13 @@ static void *_calculate_navigable_accessible_at_point_impl(accessibility_navigat // always return proxy, so atspi lib can call on it again if (CALL(object_is_proxy, target)) return target; + if (root == target) { + // browser likes small cycles in trees + // lets decline this party + return_value = target; + break; + } + root = target; void *relation_obj = CALL(get_object_in_relation_by_type, root, ATSPI_RELATION_CONTROLLED_BY); unsigned char contains = 0;