[at-spi2-core] atspi_accessible_set_cache_mask: relax assert
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] atspi_accessible_set_cache_mask: relax assert
- Date: Wed, 24 Jun 2020 16:35:31 +0000 (UTC)
commit da8f75cc0db3a76fbe779eb5bb9ec0735c03f421
Author: Mike Gorse <mgorse suse com>
Date: Wed Jun 24 11:30:22 2020 -0500
atspi_accessible_set_cache_mask: relax assert
Atspi_accessible_set_cache_mask checks that it is being passed an
application's root accessible, and this sometimes fails and generates a
warning similar to the following, even when orca passes what it sees as the
application's root accessible:
(orca:18809): dbind-CRITICAL **: 09:27:25.951: atspi_accessible_set_cache_mask: assertion 'accessible ==
accessible->parent.app->root' failed
I suspect that this is caused by atk-bridge being initialized and caching
the root accessible and atk_get_root() is subsequently redefined, in the case
of an application that loads more than one atk implementor, such as Firefox.
This is indicative of a problem that should be fixed elsewhere--possibly
gtk+ and/or firefox shouldn't override atk_get_root if it already has an
implementation--but warning and failing here isn't helpful.
atspi/atspi-accessible.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index 4be624c..d1f2589 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -1741,7 +1741,7 @@ atspi_accessible_set_cache_mask (AtspiAccessible *accessible, AtspiCache mask)
{
g_return_if_fail (accessible != NULL);
g_return_if_fail (accessible->parent.app != NULL);
- g_return_if_fail (accessible == accessible->parent.app->root);
+ g_return_if_fail (accessible == accessible->parent.app->root || accessible->role ==
ATSPI_ROLE_APPLICATION);
accessible->parent.app->cache = mask;
enable_caching = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]