If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Crash in nsDocAccessible::GetParent()

RESOLVED FIXED

Status

()

Core
Disability Access APIs
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Aaron Leventhal, Assigned: Aaron Leventhal)

Tracking

({access, crash})

Trunk
access, crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Missing null pointer check.
(Assignee)

Comment 1

11 years ago
Created attachment 261157 [details] [diff] [review]
Null checks
Attachment #261157 - Flags: review?(surkov.alexander)

Comment 2

11 years ago
Comment on attachment 261157 [details] [diff] [review]
Null checks

>Index: accessible/src/base/nsDocAccessible.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/base/nsDocAccessible.cpp,v
>retrieving revision 1.132
>diff -p -u -5 -r1.132 nsDocAccessible.cpp
>--- accessible/src/base/nsDocAccessible.cpp	10 Apr 2007 16:28:38 -0000	1.132
>+++ accessible/src/base/nsDocAccessible.cpp	10 Apr 2007 17:26:35 -0000
>@@ -439,25 +439,26 @@ NS_IMETHODIMP nsDocAccessible::CacheAcce
> 
> NS_IMETHODIMP nsDocAccessible::GetParent(nsIAccessible **aParent)
> {
>   // Hook up our new accessible with our parent
>   if (!mParent) {
>+    *aParent = nsnull;
>+    NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);

Probably you should move these lines on top of the method. I think doc accessible cannot have parent without mDocument.
Attachment #261157 - Flags: review?(surkov.alexander) → review+
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.