WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
10836
REGRESSION: Mac implementation of Font::drawGlyphs leaks a CGColorRef
https://bugs.webkit.org/show_bug.cgi?id=10836
Summary
REGRESSION: Mac implementation of Font::drawGlyphs leaks a CGColorRef
Mark Rowe (bdash)
Reported
2006-09-13 06:27:56 PDT
Line 594 of FontMac.mm (
http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/platform/mac/FontMac.mm#L594
) contains a call to cgColor(context->pen().color()) as part of the arguments of a function call. The CGColorRef returned by cgColor is retained and needs to be released to prevent it from being leaked. It seems as though Font::drawComplexText (line 485) has the same problem. This leak shows up in the Buildbot output at
http://build.webkit.org/results/post-commit-leaks-powerpc-mac-os-x/2531/DumpRenderTree5-leaks.txt
.
Attachments
Patch
(2.27 KB, patch)
2006-09-13 15:24 PDT
,
Mark Rowe (bdash)
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2006-09-13 15:24:52 PDT
Created
attachment 10548
[details]
Patch
Eric Seidel (no email)
Comment 2
2006-09-13 15:49:08 PDT
Comment on
attachment 10548
[details]
Patch My mistake, thanks for fixing. You might add a: // WebCore expects text to respect the pen color, CG expects text to use fill comment to the other place as well, I had meant to do that originally. Also, this makes me wonder if it wouldn't be a better idea to set the color on the context with 4 floats to prevent the malloc/free associated with creating a color and freeing... If it shows up in shark we'll have to move to that model. r=me
Mark Rowe (bdash)
Comment 3
2006-09-13 21:48:03 PDT
Landed in
r16356
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug