[orca/gnome-3-36] Handle yet another case of objects going defunct on us
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-36] Handle yet another case of objects going defunct on us
- Date: Mon, 25 May 2020 16:06:41 +0000 (UTC)
commit ecf78c17cd9edb32b969e67f9c27675bbf33580f
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon May 25 12:05:32 2020 -0400
Handle yet another case of objects going defunct on us
src/orca/scripts/web/script_utilities.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 57ec71ca1..695f84fbd 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3362,6 +3362,13 @@ class Utilities(script_utilities.Utilities):
if rv is not None:
return rv
+ try:
+ relations = obj.getRelationSet()
+ except:
+ msg = 'ERROR: Exception getting relationset for %s' % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
# Remove this when we bump dependencies to 2.26
try:
relationType = pyatspi.RELATION_ERROR_FOR
@@ -3369,7 +3376,7 @@ class Utilities(script_utilities.Utilities):
rv = False
else:
isMessage = lambda r: r.getRelationType() == relationType
- rv = bool(list(filter(isMessage, obj.getRelationSet())))
+ rv = bool(list(filter(isMessage, relations)))
self._isErrorMessage[hash(obj)] = rv
return rv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]