Bug 97534 (bearmingo)
| Summary: | cario_t reference leak when using cario | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | 陈国民 <bearmingo> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | Windows 7 | ||
陈国民
when create GraphicsContext instance, will make a cario_t reference leaks
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
陈国民
void GraphicsContext::platformInit(HDC dc, bool hasAlpha)
{
cairo_t* cr = 0;
if (dc)
cr = createCairoContextWithHDC(dc, hasAlpha);
else
setPaintingDisabled(true);
m_data = new GraphicsContextPlatformPrivateToplevel(new PlatformContextCairo(cr));
m_data->m_hdc = dc;
if (platformContext()->cr()) {
// Make sure the context starts in sync with our state.
setPlatformFillColor(fillColor(), fillColorSpace());
setPlatformStrokeColor(strokeColor(), strokeColorSpace());
}
//need to release cario_t reference(GraphicsContextCairoWin.cpp)
if (cr)
cairo_destroy(cr);
}