Closed
Bug 855850
Opened 10 years ago
Closed 10 years ago
Use MOZ_STATIC_ASSERT and fix typo in "need to rearrange the mBits bitfield" compile-time error-check
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(1 file)
2.21 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
nsLineBox.h currently has the following code: 149 #if NS_STYLE_CLEAR_LAST_VALUE > 15 150 need to rearrange the mBits bitfield; 151 #endif https://mxr.mozilla.org/mozilla-central/source/layout/generic/nsLineBox.h#149 which apparently is intended to break the build if NS_STYLE_CLEAR_LAST_VALUE is larger than 15 (larger than what we can represent with 4 bits). There is, however, no "mBits bitfield" (and never was). We mean to say "mFlags", which is of type FlagBits (and which contains the 4 bits to store our "clear" value). And while we're fixing that, we might as well make this a MOZ_STATIC_ASSERT.
Assignee | ||
Comment 1•10 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0) > There is, however, no "mBits bitfield" (and never was). (for reference: the CVS commit that added this line was: http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/layout/generic&command=DIFF_FRAMESET&file=nsLineBox.h&rev2=1.20&rev1=1.19 and even at that point, the bitfield in question was FlagBits mFlags -- there was no no mBits.)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
This moves the check to be a static assert in the nsLineBox constructor. (This is a sensible location for the assertion, since we're asserting about a member-var of nsLineBox)
Attachment #730901 -
Flags: review?(matspal)
Comment 3•10 years ago
|
||
Comment on attachment 730901 [details] [diff] [review] fix r=mats
Attachment #730901 -
Flags: review?(matspal) → review+
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ccf927340e8e
Flags: in-testsuite-
OS: Linux → All
Hardware: x86_64 → All
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ccf927340e8e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•