Closed Bug 769021 Opened 12 years ago Closed 12 years ago

Leak nsTArray_base with "backface-visibility: hidden", border-radius

Categories

(Core :: Layout, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: jruderman, Assigned: nrc)

References

Details

(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P3])

Attachments

(3 files, 1 obsolete file)

Attached file testcase
1. Run a debug build of Firefox with XPCOM_MEM_LEAK_LOG=2 2. Load the testcase. 3. Quit Firefox.
Attached file leak log
The MaskLayerImageKey allocated at http://hg.mozilla.org/mozilla-central/annotate/ee7a3bddfe5f/layout/base/FrameLayerBuilder.cpp#l3270 is leaked if we take the early return at http://hg.mozilla.org/mozilla-central/annotate/ee7a3bddfe5f/layout/base/FrameLayerBuilder.cpp#l3289, which this testcase triggers. As part of this bug we should add MOZ_COUNT_CTOR/DTOR macros to MaskLayerImageKey and PixelRoundedRect.
Assignee: nobody → ncameron
Tiny leak, almost impossible to hit, not very interesting to MemShrink.
Whiteboard: [MemShrink:P3]
Attached patch fix (obsolete) — Splinter Review
Attachment #657171 - Flags: review?(khuey)
Comment on attachment 657171 [details] [diff] [review] fix Review of attachment 657171 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/FrameLayerBuilder.cpp @@ +3274,2 @@ > // copy and transform the rounded rects > + for (size_t i = 0; i < newData.mRoundedClipRects.Length(); ++i) { Why did you switch from uint32_t to size_t? nsTArray::Length returns a uint32_t. ::: layout/base/MaskLayerImageCache.h @@ +114,5 @@ > // Indices into mRadii are the NS_CORNER_* constants in nsStyleConsts.h > gfxFloat mRadii[8]; > + > + private: > + PixelRoundedRect() { NS_ERROR("Don't call me!"); } No need to do this, you can make it a compile time error. http://whereswalden.com/2011/11/09/introducing-moz_delete-a-macro-improving-upon-the-deliberately-unimplemented-method-idiom/ @@ +209,5 @@ > MaskLayerImageEntry(const MaskLayerImageEntry& aOther) > : mKey(aOther.mKey.get()) > { > NS_ERROR("ALLOW_MEMMOVE == true, should never be called"); > } You should use MOZ_DELETE here too.
Attachment #657171 - Flags: review?(khuey) → review+
Attached patch fixSplinter Review
Addressed khuey's comments, carrying r+. Thanks for the pointer to MOZ_DELETE!
Attachment #657171 - Attachment is obsolete: true
Attachment #657787 - Flags: review+
Try again, fixed the missing symbol (was lazy and only did incremental build, missed the linking error, sorry): https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=f88af5665cf2 Thanks for the backout edmorley!
backed out again: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=f88af5665cf2 This one builds fine locally on Windows :-(
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: