Closed
Bug 769021
Opened 12 years ago
Closed 12 years ago
Leak nsTArray_base with "backface-visibility: hidden", border-radius
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: jruderman, Assigned: nrc)
References
Details
(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P3])
Attachments
(3 files, 1 obsolete file)
1. Run a debug build of Firefox with XPCOM_MEM_LEAK_LOG=2 2. Load the testcase. 3. Quit Firefox.
Reporter | ||
Comment 1•12 years ago
|
||
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]
Assignee | ||
Comment 4•12 years ago
|
||
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+
Assignee | ||
Comment 6•12 years ago
|
||
Try push: https://tbpl.mozilla.org/?tree=Try&rev=4ffcb9da68f4
Assignee | ||
Comment 7•12 years ago
|
||
Addressed khuey's comments, carrying r+. Thanks for the pointer to MOZ_DELETE!
Attachment #657171 -
Attachment is obsolete: true
Attachment #657787 -
Flags: review+
Assignee | ||
Comment 8•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=03cb77f8d75d
Comment 9•12 years ago
|
||
Push backed out for burning the tree: https://hg.mozilla.org/integration/mozilla-inbound/rev/a4fb15293efc
Assignee | ||
Comment 10•12 years ago
|
||
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!
Assignee | ||
Comment 11•12 years ago
|
||
backed out again: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=f88af5665cf2 This one builds fine locally on Windows :-(
Assignee | ||
Comment 12•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=61c0826e8903 (Remembered to qrefresh this time)
Comment 13•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/61c0826e8903
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.
Description
•