Closed Bug 783872 Opened 12 years ago Closed 12 years ago

Don't pass ints to NS_FAILED

Categories

(MailNews Core :: Backend, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 18.0

People

(Reporter: ayg, Assigned: ayg)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch Patch (obsolete) — Splinter Review
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-
Attached patch Patch v2Splinter Review
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
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 18.0
Blocks: 736766
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: