Closed Bug 385731 Opened 18 years ago Closed 14 years ago

ensure nsAccessibilityService::GetAccessible doesn't fail if there is no accessible for the given node

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: surkov, Unassigned)

Details

<aaronlev> surkov, i mean, if someone asks for an accessible object for a regular <span> object or something <aaronlev> we will return null for the accessible and NS_ERROR_FAILURE <aaronlev> but, an error should usually be for something not expected <aaronlev> however, it's very expected that someone will ask for a given node if ther eis an accessible object for it <aaronlev> technically we should only return an error for things that are unexpected
Summary: es → ensure nsAccessibilityService::GetAccessible doesn't fail if there is no accessible for the given node
initial work was done in bug 347019.
(In reply to comment #7 bug 347019) > Surkov, didn't we need to return NS_OK here? > http://lxr.mozilla.org/seamonkey/source/accessible/src/base/nsAccessibilityService.cpp#1131 > > 1130 if (!aAccessibleIn) { > 1131 return NS_ERROR_FAILURE; // No accessible to init > 1132 } > Either we should use NS_ENSURE_ARG() or return NS_OK. Now we do not check whether aAccessibleIn is null when we call InitAccessible(), probably we should because it doesn't make sense to call it with nsnull.
> it doesn't make sense to call it with nsnull. Okay. I think we used to have more places where we called it, and it made the code a little easier to read at that time. But I agree with you.
Mass un-assigning bugs assigned to Aaron.
Assignee: aaronleventhal → nobody
It doesn't fail anymore, was fixed at some point. Closing as worksforme.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.