[orca] Still more debugging output because in Gecko There Be Zombies



commit 22a2ae3935d6df0f41bd95ee1b62a83635fb30b3
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jun 2 12:52:09 2015 -0400

    Still more debugging output because in Gecko There Be Zombies

 src/orca/scripts/toolkits/Gecko/script.py |   34 +++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index c073218..b53634b 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1925,19 +1925,30 @@ class Script(default.Script):
 
         if self._inSayAll \
            and _settingsManager.getSetting('rewindAndFastForwardInSayAll'):
+            msg = "INFO: inSayAll and rewindAndFastforwardInSayAll is enabled"
+            debug.println(debug.LEVEL_INFO, msg)
             return True
 
         obj, offset = self.utilities.getCaretContext()
         msg = "INFO: Current context is: %s, %i" % (obj, offset)
         debug.println(debug.LEVEL_INFO, msg)
 
+        if obj and self.utilities.isZombie(obj):
+            msg = "INFO: Current context obj %s is zombie" % obj
+            debug.println(debug.LEVEL_INFO, msg)
+
         line = self.utilities.getLineContentsAtOffset(obj, offset)
+        msg = "INFO: Line contents for %s, %i: %s" % (obj, offset, line)
+        debug.println(debug.LEVEL_INFO, msg)
+
         if not (line and line[0]):
-            msg = "INFO: Could not get line contents for %s, %i" % (obj, offset)
-            debug.println(debug.LEVEL_INFO, msg)
             return False
 
-        obj, offset = self.utilities.previousContext(line[0][0], line[0][1], True)
+        firstObj, firstOffset = line[0][0], line[0][1]
+        msg = "INFO: First context on line is: %s, %i" % (firstObj, firstOffset)
+        debug.println(debug.LEVEL_INFO, msg)
+
+        obj, offset = self.utilities.previousContext(firstObj, firstOffset, True)
         msg = "INFO: Previous context is: %s, %i" % (obj, offset)
         debug.println(debug.LEVEL_INFO, msg)
 
@@ -1963,19 +1974,30 @@ class Script(default.Script):
 
         if self._inSayAll \
            and _settingsManager.getSetting('rewindAndFastForwardInSayAll'):
+            msg = "INFO: inSayAll and rewindAndFastforwardInSayAll is enabled"
+            debug.println(debug.LEVEL_INFO, msg)
             return True
 
         obj, offset = self.utilities.getCaretContext()
         msg = "INFO: Current context is: %s, %i" % (obj, offset)
         debug.println(debug.LEVEL_INFO, msg)
 
+        if obj and self.utilities.isZombie(obj):
+            msg = "INFO: Current context obj %s is zombie" % obj
+            debug.println(debug.LEVEL_INFO, msg)
+
         line = self.utilities.getLineContentsAtOffset(obj, offset)
+        msg = "INFO: Line contents for %s, %i: %s" % (obj, offset, line)
+        debug.println(debug.LEVEL_INFO, msg)
+
         if not (line and line[0]):
-            msg = "INFO: Could not get line contents for %s, %i" % (obj, offset)
-            debug.println(debug.LEVEL_INFO, msg)
             return False
 
-        obj, offset = self.utilities.nextContext(line[-1][0], line[-1][2] - 1, True)
+        lastObj, lastOffset = line[-1][0], line[-1][2] - 1
+        msg = "INFO: Last context on line is: %s, %i" % (lastObj, lastOffset)
+        debug.println(debug.LEVEL_INFO, msg)
+
+        obj, offset = self.utilities.nextContext(lastObj, lastOffset, True)
         msg = "INFO: Next context is: %s, %i" % (obj, offset)
         debug.println(debug.LEVEL_INFO, msg)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]