Bug 726764. Avoid leaking CGPaths when getting text paths. r=joe

This commit is contained in:
Jeff Muizelaar 2012-02-14 17:59:11 -05:00
parent 30d6fa7ef6
commit c6320b4170

View File

@ -102,7 +102,9 @@ ScaledFontMac::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aT
CGPathAddPath(path, &matrix, glyphPath);
CGPathRelease(glyphPath);
}
return new PathCG(path, FILL_WINDING);
TemporaryRef<Path> ret = new PathCG(path, FILL_WINDING);
CGPathRelease(path);
return ret;
} else {
return ScaledFontBase::GetPathForGlyphs(aBuffer, aTarget);
}