Closed Bug 317708 Opened 19 years ago Closed 19 years ago

cairo renderer leaks memory and uses uninitialised variables with text in SVG

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: longsonr, Unassigned)

Details

(Keywords: memory-leak)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051124 Firefox/1.6a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051124 Firefox/1.6a1 nsSVGCairoGlyphGeometry::Render and nsSVGCairoGlyphGeometry::GetBoundingBox both contain two calls to Source->GetCharacterPosition. Memory allocated in the first call is never freed. Also it looks like if GetCharacterPosition returns a non null result then we should not call mSource->GetX or GetX as these functions return uninitialised values in this case (the individual textPath positions being encoded in the GetCharacterPosition data). Reproducible: Always Steps to Reproduce: 1. Display an SVG file which contains text or textPath elements does not affect 1.5 branch.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #204136 - Flags: review?(tor) → review+
Attachment #204136 - Flags: superreview?(jst)
Comment on attachment 204136 [details] [diff] [review] remove extraneous function calls and only call GetX/Y if cp is null sr=jst
Attachment #204136 - Flags: superreview?(jst) → superreview+
Checked in for Robert.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Blocks: mlk1.8
Keywords: mlk
No longer blocks: mlk1.8
Attached patch merge to branchSplinter Review
Attachment #215293 - Flags: superreview?
Attachment #215293 - Flags: review?(longsonr)
Attachment #215293 - Flags: superreview? → superreview?(roc)
Comment on attachment 215293 [details] [diff] [review] merge to branch Really, we should be using nsAutoPtr for cp.
Attachment #215293 - Flags: superreview?(roc)
Attachment #215293 - Flags: superreview+
Attachment #215293 - Flags: review?(longsonr)
Attachment #215293 - Flags: review+
Checked in on branch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: