[orca] Chromium: Handle two more instances of defunct objects
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Handle two more instances of defunct objects
- Date: Wed, 21 Nov 2018 14:25:25 +0000 (UTC)
commit 0cd1e20e08ea65e17d5527ecce5e252a36ce8abc
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Nov 21 09:25:03 2018 -0500
Chromium: Handle two more instances of defunct objects
src/orca/scripts/toolkits/Chromium/script_utilities.py | 8 +++++++-
src/orca/scripts/web/script_utilities.py | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index cf7446ae6..d19a5edd5 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -121,7 +121,13 @@ class Utilities(web.Utilities):
return False
roles = [pyatspi.ROLE_LIST_BOX, pyatspi.ROLE_MENU]
- child = pyatspi.findDescendant(frame, lambda x: x and x.getRole() in roles)
+ try:
+ child = pyatspi.findDescendant(frame, lambda x: x and x.getRole() in roles)
+ except:
+ msg = "CHROMIUM: Exception finding descendant of %s" % frame
+ debug.println(debug.LEVEL_INFO, msg, True)
+ child = None
+
return child and not self.inDocumentContent(child)
def canBeActiveWindow(self, window, clearCache=False):
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 4a197a43a..68b8ee976 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2383,7 +2383,13 @@ class Utilities(script_utilities.Utilities):
rv = False
isLabel = lambda r: r.getRelationType() == pyatspi.RELATION_LABEL_FOR
- relations = list(filter(isLabel, obj.getRelationSet()))
+ try:
+ relations = list(filter(isLabel, obj.getRelationSet()))
+ except:
+ msg = "WEB: Exception getting relations of %s" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return []
+
if not relations:
return []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]