Closed
Bug 781380
Opened 12 years ago
Closed 12 years ago
[Azure] Memory leak in Azure/Cairo
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: ajones, Assigned: ajones)
References
()
Details
Attachments
(2 files, 1 obsolete file)
2.66 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
819 bytes,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Azure/Cairo content leaks substantial amounts of memory upon completion of the maze. This was traced back to cairo surface memory leak in DrawTargetCairo::CreateSimilarDrawTarget() which is called frequently in Canvas code.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #650363 -
Flags: review?(ncameron)
Assignee | ||
Comment 2•12 years ago
|
||
Note that Init() calls cairo_surface_reference() so the call to cairo_surface_destroy() cancels that out.
Assignee | ||
Updated•12 years ago
|
Attachment #650363 -
Flags: review?(ncameron) → review?(roc)
Assignee | ||
Updated•12 years ago
|
Attachment #650363 -
Flags: review?(roc)
Assignee | ||
Updated•12 years ago
|
Attachment #650363 -
Flags: review?(karlt)
Can't we just change Init() to not add a reference to the surface?
Assignee | ||
Comment 4•12 years ago
|
||
That would be another option but it would change the meaning of Init(). This would mean Factory::CreateDrawTargetForCairoSurface() would need to call cairo_surface_reference() before calling Init(). This would spread the reference counting logic across files. Avoiding the extra reference/destroy could be achieved by creating an internal version of the Init() function which doesn't call cairo_surface_reference().
Let's do that then.
Updated•12 years ago
|
Attachment #650363 -
Flags: review?(karlt)
Assignee | ||
Comment 6•12 years ago
|
||
Created an internal init method that doesn't call cario_surface_reference()
Attachment #650363 -
Attachment is obsolete: true
Attachment #650711 -
Flags: review?(roc)
Attachment #650711 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•12 years ago
|
||
Missing cairo_surface_destroy call.
Attachment #651879 -
Flags: review?(roc)
Attachment #651879 -
Flags: review?(roc) → review+
Assignee | ||
Comment 8•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=09e71b199e6b
Keywords: checkin-needed
Comment 9•12 years ago
|
||
(In reply to Anthony Jones (:kentuckyfriedtakahe) from comment #8) > https://tbpl.mozilla.org/?tree=Try&rev=09e71b199e6b This is showing Windows XP gfxASurface leaks, no?
Keywords: checkin-needed
Assignee | ||
Comment 10•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=f495fefb620a
Assignee | ||
Comment 11•12 years ago
|
||
Resubmitted to try without the faulty patch (from another bug). Note that the DrawTargetCairo code path affected by these patches is yet to be enabled on Linux.
Whiteboard: checkin-needed
Comment 12•12 years ago
|
||
(In reply to Anthony Jones (:kentuckyfriedtakahe) from comment #10) > https://tbpl.mozilla.org/?tree=Try&rev=f495fefb620a Green on Try. https://hg.mozilla.org/integration/mozilla-inbound/rev/c97a0ffcf500 https://hg.mozilla.org/integration/mozilla-inbound/rev/e137f28dfe70
Flags: in-testsuite-
Whiteboard: checkin-needed
Comment 13•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c97a0ffcf500 https://hg.mozilla.org/mozilla-central/rev/e137f28dfe70
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Comment 14•12 years ago
|
||
Apparently part of this fix got lost in the original landing. Landed a follow-up for it. https://hg.mozilla.org/integration/mozilla-inbound/rev/625f746bedf9
Comment 15•12 years ago
|
||
And on aurora too. https://hg.mozilla.org/releases/mozilla-aurora/rev/02ba8b87cc48
You need to log in
before you can comment on or make changes to this bug.
Description
•