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)
Core
Disability Access APIs
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: surkov, Unassigned)
Details
Reporter | ||
Comment 1•18 years ago
|
||
<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
Reporter | ||
Comment 2•18 years ago
|
||
initial work was done in bug 347019.
Reporter | ||
Comment 3•18 years ago
|
||
(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.
Comment 4•18 years ago
|
||
> 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.
Reporter | ||
Comment 6•14 years ago
|
||
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.
Description
•