Closed Bug 728913 Opened 8 years ago Closed 8 years ago

Remove nsMenuFrame::mPopupFrame and store it in a nsFrameList* frame property instead (as needed)

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: mats, Assigned: mats)

References

Details

(Whiteboard: [inbound])

Attachments

(1 file)

This is to support GetChildList() returning const nsFrameList&.
This will use more memory when there is a popup child frame, but a quick
check shows that's only the case for about 25% of nsMenuFrame instances.
So overall, the memory use will be slightly better.
Remove the nsMenuFrame::mPopupFrame member and store it in a nsFrameList* frame property instead (as needed).
Attachment #598908 - Flags: review?(bzbarsky)
(In reply to Mats Palmgren [:mats] from comment #0)
> This will use more memory when there is a popup child frame, but a quick
> check shows that's only the case for about 25% of nsMenuFrame instances.
> So overall, the memory use will be slightly better.

Do you know what the minimum allocation size in the malloc() implementations we use on different platforms is, and what the overhead is at that size?
Good question, I'll look in to it...
This is from Try server:
https://hg.mozilla.org/try/raw-rev/e68871cd2f97
    Linux opt:       sizeof=8 malloc_size_of=8 (pointer-size:4)
    Linux64 opt:     sizeof=16 malloc_size_of=16 (pointer-size:8)
    OS X64 opt:      sizeof=16 malloc_size_of=16 (pointer-size:8)
    Win opt:         sizeof=8 malloc_size_of=8 (pointer-size:4)
    Win64 opt:       -- missing data --
    WinXP opt:       sizeof=8 malloc_size_of=8 (pointer-size:4)

local build of Fennec Android: sizeof=8 malloc_size_of=8 (pointer-size:4)
Comment on attachment 598908 [details] [diff] [review]
popup list as frame property

r=me
Attachment #598908 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/56fa5c3788e2
Whiteboard: [inbound]
Target Milestone: --- → mozilla13
https://hg.mozilla.org/mozilla-central/rev/56fa5c3788e2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.