Closed
Bug 393897
Opened 19 years ago
Closed 19 years ago
IA2 methods returning S_FALSE on success
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(1 file)
|
11.68 KB,
patch
|
aaronlev
:
review+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
Certain methods like get_textAtOffset() are returning S_FALSE, when the caller is expecting S_OK.
http://lxr.mozilla.org/seamonkey/source/accessible/src/msaa/CAccessibleText.cpp#313
It must be lines like this causing the problem:
return ::SysReAllocStringLen(aText, text.get(), text.Length());
We need to take a look at the return values for ::SysReAllocStringLen(). It might be be that we need to explicitly return S_OK;
| Assignee | ||
Comment 1•19 years ago
|
||
It looks I was confused by mobile version of SysReAllocStringLen (see http://msdn2.microsoft.com/en-us/library/Aa910803.aspx) that returns HRESULT. The version we use is http://msdn2.microsoft.com/en-us/library/ms221533.aspx where TRUE means successful result. But if I get right boolean(S_FALSE) is TRUE. Correct? How can I test it?
| Reporter | ||
Comment 2•19 years ago
|
||
> boolean(S_FALSE) is TRUE.
What do you mean?
Can you do:
success = ::SysReAllocStringLen(...);
return success ? S_OK: E_FAIL;
You should be able to test it just by using the API in any small test-app, or a printf before you return to say what you are returning.
| Assignee | ||
Comment 3•19 years ago
|
||
Attachment #278548 -
Flags: review?(aaronleventhal)
| Assignee | ||
Comment 4•19 years ago
|
||
(In reply to comment #2)
> > boolean(S_FALSE) is TRUE.
> What do you mean?
I mean S_OK == 0 == PR_FALSE
E_FAIL == 1 == PR_TRUE
| Reporter | ||
Updated•19 years ago
|
Attachment #278548 -
Flags: review?(aaronleventhal)
Attachment #278548 -
Flags: review+
Attachment #278548 -
Flags: approval1.9?
Updated•19 years ago
|
Attachment #278548 -
Flags: approval1.9? → approval1.9+
| Assignee | ||
Comment 5•19 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•