From af85370b7eac58fe69c888310de6f2fcbb9cc4d8 Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Fri, 20 Dec 2013 11:14:26 -0800 Subject: [PATCH] Bug 952141 - Fix error when user lifts finger with no valid vc position. r=yzen --- accessible/src/jsat/content-script.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/accessible/src/jsat/content-script.js b/accessible/src/jsat/content-script.js index a7800644ca08..cc127bc08a6d 100644 --- a/accessible/src/jsat/content-script.js +++ b/accessible/src/jsat/content-script.js @@ -163,9 +163,14 @@ function forwardToChild(aMessage, aListener, aVCPosition) { function activateCurrent(aMessage) { Logger.debug('activateCurrent'); function activateAccessible(aAccessible) { - if (aMessage.json.activateIfKey && - aAccessible.role != Roles.KEY) { - // Only activate keys, don't do anything on other objects. + try { + if (aMessage.json.activateIfKey && + aAccessible.role != Roles.KEY) { + // Only activate keys, don't do anything on other objects. + return; + } + } catch (e) { + // accessible is invalid. Silently fail. return; }