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.
Created attachment 10548 [details] Patch
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
Landed in r16356.