Closed
Bug 806002
Opened 13 years ago
Closed 13 years ago
Make nsDidReflowStatus into an enum
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 file)
1.22 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•13 years ago
|
||
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
Assignee | ||
Comment 2•13 years ago
|
||
This patch currently breaks the build due to bug 806001 (yay, we can catch bugs!) but it builds successfully after that bug is fixed.
Comment on attachment 675720 [details] [diff] [review]
fix
r=dbaron
Attachment #675720 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 4•13 years ago
|
||
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
Flags: in-testsuite-
Comment 5•13 years ago
|
||
Hmm, I wish you had made it an enum class. :-)
Assignee | ||
Comment 6•13 years ago
|
||
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!
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 8•13 years ago
|
||
Filed bug 810355.
Assignee | ||
Updated•13 years ago
|
OS: Linux → All
Hardware: x86_64 → All
You need to log in
before you can comment on or make changes to this bug.
Description
•