Closed
Bug 1009685
Opened 11 years ago
Closed 11 years ago
Path2D leak
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
mozilla32
Tracking | Status | |
---|---|---|
firefox30 | --- | unaffected |
firefox31 | --- | fixed |
firefox32 | --- | fixed |
People
(Reporter: jruderman, Assigned: mccr8)
References
Details
(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P2] [qa-])
Attachments
(3 files)
188 bytes,
text/html
|
Details | |
3.68 KB,
patch
|
bzbarsky
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
3.61 KB,
patch
|
Details | Diff | Splinter Review |
1. Run with XPCOM_MEM_LEAK_LOG=2 2. Load the testcase 3. Quit Firefox Result: trace-refcnt reports leaked nsGlobalWindow and nsDocument objects
Assignee | ||
Updated•11 years ago
|
Whiteboard: [MemShrink]
Comment 1•11 years ago
|
||
I'm unsure why this is happening or what I can do about this. Could it be an issue with the defines: NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release) NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(CanvasPath)
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 2•11 years ago
|
||
I can take a look.
Assignee: nobody → continuation
Flags: needinfo?(bzbarsky)
Comment 3•11 years ago
|
||
> Could it be an issue with the defines:
Yes. CanvasPath has a strong ref to mParent but isn't telling the cycle collector about it, no?
Comment 4•11 years ago
|
||
And in fact, the cycle in that testcase is, I expect, Window JS object -> CanvasPath JS object -> CanvasPath C++ object -> Window C++ object (mParent) -> Window JS object via preserved wrapper. Also, why are the CanvasPath constructors taking an nsCOMPtr argument, not a raw pointer? And why is the one-arg constructor not explicit?
Assignee | ||
Updated•11 years ago
|
Blocks: 830734
status-firefox30:
--- → unaffected
status-firefox31:
--- → affected
status-firefox32:
--- → affected
Assignee | ||
Comment 5•11 years ago
|
||
Yeah, I noticed the missing mPath. Adding that to the CC macros fixes the leak.
Comment 6•11 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #5) > Yeah, I noticed the missing mPath. Adding that to the CC macros fixes the > leak. Will you land that fix? If not, post the line that should change and I will do it.
Assignee | ||
Comment 7•11 years ago
|
||
Yeah, it is a very simple fix. I have a patch that fixes that and the other things bz pointed out. I'll upload it here assuming the try run is green, or you can just go look at the try thing if you curious. try run: https://tbpl.mozilla.org/?tree=Try&rev=93e68741cd27
Assignee | ||
Comment 8•11 years ago
|
||
I tried changing the RefPtr<PathBuilder> in the ctor arg to a raw pointer, but it looks like there's no implicit conversion, which scared me, so I just left it alone.
Updated•11 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P2]
Comment 9•11 years ago
|
||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 10•11 years ago
|
||
I assume bz reviewed this patch since it says "r=bz"
Comment 11•11 years ago
|
||
You assume incorrectly. It's common to put the planned reviewer in the commit message while developing, so the patch doesn't need more updates if it gets review+.
Comment 12•11 years ago
|
||
Comment on attachment 8422227 [details] [diff] [review] Fix for memory leak in Path2D + added test case That said, r=me
Attachment #8422227 -
Flags: review+
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/967ee3262d27
Keywords: checkin-needed
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 14•11 years ago
|
||
The patch was already landed, it doesn't need the checkin-needed keyword any more.
Thanks for uploading the patch, though I was going to just do that myself this morning. :)
> so the patch doesn't need more updates if it gets review+.
It is also quite handy because git-bz now uses that info to pre-populate the review? field when uploading a patch.
Anyways, if you don't see anything about a patch being r+ in the bug, you should assume it isn't.
Keywords: checkin-needed
Comment 15•11 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #14) > The patch was already landed, it doesn't need the checkin-needed keyword any > more. > > Thanks for uploading the patch, though I was going to just do that myself > this morning. :) ah, I reread the thread and I can see now that I misunderstood. :-) > > so the patch doesn't need more updates if it gets review+. > It is also quite handy because git-bz now uses that info to pre-populate the > review? field when uploading a patch. > > Anyways, if you don't see anything about a patch being r+ in the bug, you > should assume it isn't. OK. Good to know.
Assignee | ||
Comment 16•11 years ago
|
||
Comment on attachment 8422227 [details] [diff] [review] Fix for memory leak in Path2D + added test case [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 830734 User impact if declined: severe memory leaks with a new feature Testing completed (on m-c, etc.): landed on inbound Risk to taking this patch (and alternatives if risky): very low String or IDL/UUID changes made by this patch: none
Attachment #8422227 -
Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/967ee3262d27
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•11 years ago
|
Updated•11 years ago
|
Attachment #8422227 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 18•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/67d0b27a43d9
Flags: in-testsuite+
Comment 19•11 years ago
|
||
Backed out for bustage. https://hg.mozilla.org/releases/mozilla-aurora/rev/c3c8afe1aa39 https://tbpl.mozilla.org/php/getParsedLog.php?id=39730862&tree=Mozilla-Aurora
Updated•11 years ago
|
Flags: needinfo?(continuation)
Keywords: branch-patch-needed
Assignee | ||
Comment 20•11 years ago
|
||
Oops, right, the fancy variadic macros are not in Aurora. I'll fix that up later today. Thanks!
Flags: needinfo?(continuation)
Assignee | ||
Comment 21•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: branch-patch-needed
Assignee | ||
Comment 22•11 years ago
|
||
I confirmed locally that this compiles on Aurora.
Updated•11 years ago
|
Whiteboard: [MemShrink:P2] → [MemShrink:P2] [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•