Right now, the nsDidReflowStatus type is defined as follows: > 508 /** > 509 * DidReflow status values. > 510 */ > 511 typedef bool nsDidReflowStatus; > 512 > 513 #define NS_FRAME_REFLOW_NOT_FINISHED false > 514 #define NS_FRAME_REFLOW_FINISHED true http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsIFrame.h#508 We should convert it into an enum instead of a typedef, so compilers can enforce that we're using it correctly and not accidentally passing in a different type. (to prevent bugs like bug 806001)
Depends on: 806001
Created attachment 675720 [details] [diff] [review] fix This patch currently breaks the build due to bug 806001 (yay, we can catch bugs!) but it builds successfully after that bug is fixed.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #675720 - Flags: review?(dbaron)
Comment on attachment 675720 [details] [diff] [review] fix r=dbaron
Attachment #675720 - Flags: review?(dbaron) → review+
Green try run, aside from a few known-intermittent-oranges: https://tbpl.mozilla.org/?tree=Try&rev=f08b1abd0d3d Landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/74d3d6a66e7d
Hmm, I wish you had made it an enum class. :-)
I haven't dug into C++11 stuff too much yet, so I don't exactly know the distinction -- but FWIW, just making it an enum did catch some bugs (via compile errors), as noted in comment 2! But if you think it'd help, feel free to file followup on making it an enum class if you like!
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Filed bug 810355.
You need to log in before you can comment on or make changes to this bug.