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) (next working March 28-April 26)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 782594
  Show dependency treegraph
 
Reported: 2012-08-14 04:39 PDT by Aryeh Gregor (:ayg) (next working March 28-April 26)
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) (next working March 28-April 26)
hsivonen: review+
Details | Diff | Splinter Review

Description Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-08-14 04:39:49 PDT

    
Comment 1 Aryeh Gregor (:ayg) (next working March 28-April 26) 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 2 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-08-16 05:58:21 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/572b72100118

Green try: https://tbpl.mozilla.org/?tree=Try&rev=da4047717ef7
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.