Closed Bug 1153253 Opened 9 years ago Closed 9 years ago

move nsImageBoxFrame::mRequestRegistered to pack better with other members

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

Given alignment requirements on most platforms, there will be at least 3
bytes of padding after mRequestRegistered in its current location, and
at least one unused byte at the end of the structure.  We can move
mRequestRegistered after mLoadFlags so that it packs properly with the
boolean flags already there for less wasted space.
Noticed while doing a bit of other work.
Attachment #8590861 - Flags: review?(dholbert)
Comment on attachment 8590861 [details] [diff] [review]
move nsImageBoxFrame::mRequestRegistered to pack better with other members

Please also update the init list here to keep it in the right order (or else you'll get a compile warning):
 http://mxr.mozilla.org/mozilla-central/source/layout/xul/nsImageBoxFrame.cpp#147

The "mRequestRegistered(false)" and "mLoadFlags(nsIRequest::LOAD_NORMAL)" lines just need to be swapped, I think.

r=me with that
Attachment #8590861 - Flags: review?(dholbert) → review+
(In reply to Daniel Holbert [:dholbert] from comment #2)
> Please also update the init list here to keep it in the right order (or else
> you'll get a compile warning):
>  http://mxr.mozilla.org/mozilla-central/source/layout/xul/nsImageBoxFrame.
> cpp#147

Thanks for pointing this out!  Saved me from a "oh, that patch is trivial, doesn't need real try testing" incident with the sheriffs.
https://hg.mozilla.org/mozilla-central/rev/4f757be7142f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: