Last Comment Bug 782602 - Use NS_FAILED instead of boolean test for mBroken/IsBroken()
: Use NS_FAILED instead of boolean test for mBroken/IsBroken()
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: HTML: Parser (show other bugs)
: Trunk
: All All
: -- minor (vote)
: mozilla17
Assigned To: Aryeh Gregor (:ayg) (away until October 25)
:
:
Mentors:
Depends on:
Blocks: 782594
  Show dependency treegraph
 
Reported: 2012-08-14 04:39 PDT by Aryeh Gregor (:ayg) (away until October 25)
Modified: 2012-08-16 17:58 PDT (History)
1 user (show)
ayg: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (3.50 KB, patch)
2012-08-14 04:44 PDT, Aryeh Gregor (:ayg) (away until October 25)
hsivonen: review+
Details | Diff | Splinter Review

Description Aryeh Gregor (:ayg) (away until October 25) 2012-08-14 04:39:49 PDT

    
Comment 1 Aryeh Gregor (:ayg) (away until October 25) 2012-08-14 04:44:59 PDT
Created attachment 651694 [details] [diff] [review]
Patch

mBroken is an nsresult, and IsBroken() returns an nsresult.  Testing them as though they were booleans won't compile when nsresult is an enum class, even though it will work fine as long as you don't use success codes other than NS_OK.  So NS_FAILED/NS_SUCCEEDED need to be used here.
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-08-16 17:58:00 PDT
https://hg.mozilla.org/mozilla-central/rev/572b72100118

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