[orca] Add more Zombie checks and cache clearing
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add more Zombie checks and cache clearing
- Date: Tue, 13 Oct 2015 13:05:28 +0000 (UTC)
commit ca0e93b4e9a1eee15934d690becd496e195c8c44
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Oct 13 09:03:08 2015 -0400
Add more Zombie checks and cache clearing
src/orca/scripts/web/script_utilities.py | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index e3de8ee..cf74140 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1183,7 +1183,12 @@ class Utilities(script_utilities.Utilities):
debug.println(debug.LEVEL_INFO, msg)
if obj and self.isZombie(obj):
- msg = "WEB: Current context obj %s is zombie" % obj
+ msg = "WEB: Current context obj %s is zombie. Clearing cache." % obj
+ debug.println(debug.LEVEL_INFO, msg)
+ self.clearCachedObjects()
+
+ obj, offset = self.getCaretContext()
+ msg = "WEB: Now Current context is: %s, %i" % (obj, offset)
debug.println(debug.LEVEL_INFO, msg)
line = self.getLineContentsAtOffset(obj, offset, layoutMode, useCache)
@@ -1223,7 +1228,12 @@ class Utilities(script_utilities.Utilities):
debug.println(debug.LEVEL_INFO, msg)
if obj and self.isZombie(obj):
- msg = "WEB: Current context obj %s is zombie" % obj
+ msg = "WEB: Current context obj %s is zombie. Clearing cache." % obj
+ debug.println(debug.LEVEL_INFO, msg)
+ self.clearCachedObjects()
+
+ obj, offset = self.getCaretContext()
+ msg = "WEB: Now Current context is: %s, %i" % (obj, offset)
debug.println(debug.LEVEL_INFO, msg)
line = self.getLineContentsAtOffset(obj, offset, layoutMode, useCache)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]