Title: [134629] trunk/Source/WebCore
Revision
134629
Author
[email protected]
Date
2012-11-14 10:53:36 -0800 (Wed, 14 Nov 2012)

Log Message

[WinCairo] Fix cairo_t* memory leak in GraphicsContext::platformInit
https://bugs.webkit.org/show_bug.cgi?id=76219

Patch by Hideki Yoshida <[email protected]> on 2012-11-14
Reviewed by Brent Fulgham.

This patch is to fix a memory leak problem which occurs
in every rendering process on Wincairo port.
By applying this patch, the memory allocated in cairo 
library will be released by calling cairo_destroy.

* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore::GraphicsContext::platformInit):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134628 => 134629)


--- trunk/Source/WebCore/ChangeLog	2012-11-14 18:51:51 UTC (rev 134628)
+++ trunk/Source/WebCore/ChangeLog	2012-11-14 18:53:36 UTC (rev 134629)
@@ -1,3 +1,18 @@
+2012-11-14  Hideki Yoshida  <[email protected]>
+
+        [WinCairo] Fix cairo_t* memory leak in GraphicsContext::platformInit
+        https://bugs.webkit.org/show_bug.cgi?id=76219
+
+        Reviewed by Brent Fulgham.
+
+        This patch is to fix a memory leak problem which occurs
+        in every rendering process on Wincairo port.
+        By applying this patch, the memory allocated in cairo 
+        library will be released by calling cairo_destroy.
+
+        * platform/graphics/win/GraphicsContextCairoWin.cpp:
+        (WebCore::GraphicsContext::platformInit):
+
 2012-11-14  Sami Kyostila  <[email protected]>
 
         Optimize painting of composited scrolling layers

Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp (134628 => 134629)


--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp	2012-11-14 18:51:51 UTC (rev 134628)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp	2012-11-14 18:53:36 UTC (rev 134629)
@@ -88,6 +88,8 @@
         setPlatformFillColor(fillColor(), fillColorSpace());
         setPlatformStrokeColor(strokeColor(), strokeColorSpace());
     }
+    if (cr)
+        cairo_destroy(cr);
 }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to