Closed Bug 393897 Opened 19 years ago Closed 19 years ago

IA2 methods returning S_FALSE on success

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

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;
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?
> 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.
Attached patch patch — — Splinter Review
Attachment #278548 - Flags: review?(aaronleventhal)
(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
Attachment #278548 - Flags: review?(aaronleventhal)
Attachment #278548 - Flags: review+
Attachment #278548 - Flags: approval1.9?
Attachment #278548 - Flags: approval1.9? → approval1.9+
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.

Attachment

General

Created:
Updated:
Size: