The default bug view has changed. See this FAQ.

Don't pass ints to NS_FAILED

RESOLVED FIXED in Thunderbird 18.0

Status

MailNews Core
Backend
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ayg, Assigned: ayg)

Tracking

unspecified
Thunderbird 18.0
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Created attachment 653164 [details] [diff] [review]
Patch

This makes c-c compile again with the nsresult enum patch, after NS_FAILED was made a function.
Attachment #653164 - Flags: review?(irving)
Comment on attachment 653164 [details] [diff] [review]
Patch

Review of attachment 653164 [details] [diff] [review]:
-----------------------------------------------------------------

I should have caught this in reviewing the previous patch that changed the type of 'status' to int - all the methods we call and assign to status return nsresult (except one, as noted below), so I don't think we should have changed the type in the first place.

::: mailnews/compose/src/nsMsgSend.cpp
@@ +1169,5 @@
>    ma->m_current_column = 0;
>  
>    if (ma->m_type.LowerCaseEqualsLiteral(MESSAGE_RFC822) ||
>        ma->m_type.LowerCaseEqualsLiteral(MESSAGE_NEWS)) {
>      status = part->SetStripSensitiveHeaders(true);

This is the only call that returns int, and it always returns 0: https://mxr.mozilla.org/comm-central/source/mailnews/compose/src/nsMsgSendPart.h#48
Attachment #653164 - Flags: review?(irving) → review-
Created attachment 655952 [details] [diff] [review]
Patch v2

This does look much nicer!  Try: https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=5b0ca67e7121
Attachment #653164 - Attachment is obsolete: true
Attachment #655952 - Flags: review?(irving)
Comment on attachment 655952 [details] [diff] [review]
Patch v2

Aryeh, thanks for going through all this. If we should ever find ourselves in the same location I will ply you with all the food and drink...
Attachment #655952 - Flags: review?(irving) → review+
I was told the try looks green by c-c standards, so . . .

https://hg.mozilla.org/comm-central/rev/42f4032b56a9
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 18.0

Updated

5 years ago
Blocks: 736766
You need to log in before you can comment on or make changes to this bug.