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


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

Description :Aryeh Gregor (away until August 15) 2012-08-19 04:00:03 PDT

    
Comment 1 :Aryeh Gregor (away until August 15) 2012-08-19 04:02:20 PDT
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.
Comment 2 :Irving Reid (No longer working on Firefox) 2012-08-20 10:18:22 PDT
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
Comment 3 :Aryeh Gregor (away until August 15) 2012-08-28 04:58:39 PDT
Created attachment 655952 [details] [diff] [review]
Patch v2

This does look much nicer!  Try: https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=5b0ca67e7121
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 (away until August 15) 2012-08-31 05:17:59 PDT
I was told the try looks green by c-c standards, so . . .

https://hg.mozilla.org/comm-central/rev/42f4032b56a9

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