Last Comment Bug 783872 - Don't pass ints to NS_FAILED
: Don't pass ints to NS_FAILED
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: unspecified
: All All
: -- minor (vote)
: Thunderbird 18.0
Assigned To: :Aryeh Gregor (working until September 2)
Depends on:
Blocks: 736766 nsresult-enum
  Show dependency treegraph
Reported: 2012-08-19 04:00 PDT by :Aryeh Gregor (working until September 2)
Modified: 2012-09-03 02:41 PDT (History)
1 user (show)
ayg: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch (1.92 KB, patch)
2012-08-19 04:02 PDT, :Aryeh Gregor (working until September 2)
irving: review-
Details | Diff | Splinter Review
Patch v2 (2.49 KB, patch)
2012-08-28 04:58 PDT, :Aryeh Gregor (working until September 2)
irving: review+
Details | Diff | Splinter Review

Description :Aryeh Gregor (working until September 2) 2012-08-19 04:00:03 PDT

Comment 1 :Aryeh Gregor (working until September 2) 2012-08-19 04:02:20 PDT
Created attachment 653164 [details] [diff] [review]

This makes c-c compile again with the nsresult enum patch, after NS_FAILED was made a function.
Comment 2 :Irving Reid (No longer working on Firefox) 2012-08-20 10:18:22 PDT
Comment on attachment 653164 [details] [diff] [review]

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:
Comment 3 :Aryeh Gregor (working until September 2) 2012-08-28 04:58:39 PDT
Created attachment 655952 [details] [diff] [review]
Patch v2

This does look much nicer!  Try:
Comment 4 :Irving Reid (No longer working on Firefox) 2012-08-28 19:41:45 PDT
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...
Comment 5 :Aryeh Gregor (working until September 2) 2012-08-31 05:17:59 PDT
I was told the try looks green by c-c standards, so . . .

Note You need to log in before you can comment on or make changes to this bug.