Closed Bug 797961 Opened 7 years ago Closed 7 years ago

[AccessFu] Regression when nodes are hidden

Categories

(Core :: Disability Access APIs, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

A regression for bug 758884 has appeared where the catch block does not seem to do the right thing if the node does not exist.
Attachment #668087 - Flags: review?(dbolter)
Comment on attachment 668087 [details] [diff] [review]
Fix disappearing node case

Review of attachment 668087 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with concerns addressed:

::: accessible/src/jsat/content-script.js
@@ +47,5 @@
>          }
>        } catch (x) {
> +        let acc = Utils.AccRetrieval.
> +          getAccessibleFor(content.document.activeElement);
> +        moved = vc.moveNext(rule, acc, true);

Please confirm what happens if acc is null (can it be null)?
Also, shouldn't this be vc[details.action] instead of moveNext or are you purposely defaulting to moveNext here?

@@ +89,5 @@
>        mm.sendAsyncMessage(aMessage.name, aMessage.json);
>        return true;
>      }
>    } catch (x) {
> +    // Frame may be hidden, we regard this case as false.

What was the exception/error when the frame is hidden?
Attachment #668087 - Flags: review?(dbolter) → review+
https://hg.mozilla.org/mozilla-central/rev/5612c5ab7fcf
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.