Closed Bug 635346 Opened 14 years ago Closed 14 years ago

Crash [@ nsAccessNode::GetContent] [@ nsDocAccessible::AddDependentIDsFor] setting "for" attribute on <body>

Categories

(Core :: Disability Access APIs, defect)

x86
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla2.0b12

People

(Reporter: jruderman, Assigned: surkov)

References

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(3 files)

Attached file testcase (deleted) —
1. Enable accessibility, e.g. by pasting the following into the js console:

Components
  .classes["@mozilla.org/accessibilityService;1"]
  .getService(Components.interfaces.nsIAccessibleRetrieval);

2. Load the testcase.

Result: Null deref crash [@ nsAccessNode::GetContent]
Attached file crash log (deleted) —
bp-45f45514-9051-4231-ad0d-c24242110218 [@ nsDocAccessible::AddDependentIDsFor]

There are 6 other crash reports for this signature, all from Firefox 4 Beta 11.
Summary: Crash [@ nsAccessNode::GetContent] setting "for" attribute on <body> → Crash [@ nsAccessNode::GetContent] [@ nsDocAccessible::AddDependentIDsFor] setting "for" attribute on <body>
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #513938 - Flags: review?(fherrera)
Attachment #513938 - Flags: approval2.0?
Comment on attachment 513938 [details] [diff] [review]
allow relation on document accessible defined on document content

Checked the crash and the Fix. Good catch!

The patch it's ok.

Open nit question. Do you think this:

>-    if (accessible)
>-      RemoveDependentIDsFor(accessible, aAttribute);
>+    if (!accessible) {
>+      if (aElement != mContent)
>+        return;
>+
>+      accessible = this;
>+    }
>+    RemoveDependentIDsFor(accessible, aAttribute);
>   }
> }

would be more clear like this?:

    if (accessible)
      RemoveDependentIDsFor(accessible, aAttribute);
    else îf (aElement == mContent)
      RemoveDependentIDsFor(this, aAttribute);
    
I had to double think when I read the "accessible = this" line :).

regardless, r=me
Attachment #513938 - Flags: review?(fherrera) → review+
Comment on attachment 513938 [details] [diff] [review]
allow relation on document accessible defined on document content

a=me with fer's nit addressed.
Attachment #513938 - Flags: approval2.0? → approval2.0+
landed with Fernando's comment addressed - http://hg.mozilla.org/mozilla-central/rev/478422d2a964
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b12
Flags: in-testsuite+
(In reply to comment #7)
> landed with Fernando's comment addressed -
> http://hg.mozilla.org/mozilla-central/rev/478422d2a964

Gecko 2.0 (fx4b12)
Crash Signature: [@ nsAccessNode::GetContent] [@ nsDocAccessible::AddDependentIDsFor]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: