Title: [122233] trunk/Source
- Revision
- 122233
- Author
- [email protected]
- Date
- 2012-07-10 10:05:24 -0700 (Tue, 10 Jul 2012)
Log Message
[GTK] Fix memory leaks by adopting allocation of GdkPixbuf
https://bugs.webkit.org/show_bug.cgi?id=90790
Patch by Sudarsana Nagineni <[email protected]> on 2012-07-10
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Fixed a memory leak in paintGdkPixbuf by adopting an allocation
of GdkPixbuf.
No new tests. No change in behavior.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::paintGdkPixbuf):
Source/WebKit/gtk:
Fixed a memory leak in WebKitFaviconDatabase by adopting an
allocation of GdkPixbuf.
* webkit/webkitfavicondatabase.cpp:
(getIconPixbufSynchronously):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (122232 => 122233)
--- trunk/Source/WebCore/ChangeLog 2012-07-10 17:03:51 UTC (rev 122232)
+++ trunk/Source/WebCore/ChangeLog 2012-07-10 17:05:24 UTC (rev 122233)
@@ -1,3 +1,18 @@
+2012-07-10 Sudarsana Nagineni <[email protected]>
+
+ [GTK] Fix memory leaks by adopting allocation of GdkPixbuf
+ https://bugs.webkit.org/show_bug.cgi?id=90790
+
+ Reviewed by Carlos Garcia Campos.
+
+ Fixed a memory leak in paintGdkPixbuf by adopting an allocation
+ of GdkPixbuf.
+
+ No new tests. No change in behavior.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::paintGdkPixbuf):
+
2012-07-10 Konrad Piascik <[email protected]>
Web Inspector: Geolocation override
Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp (122232 => 122233)
--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp 2012-07-10 17:03:51 UTC (rev 122232)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp 2012-07-10 17:05:24 UTC (rev 122233)
@@ -238,10 +238,11 @@
static void paintGdkPixbuf(GraphicsContext* context, const GdkPixbuf* icon, const IntRect& iconRect)
{
IntSize iconSize(gdk_pixbuf_get_width(icon), gdk_pixbuf_get_height(icon));
+ GRefPtr<GdkPixbuf> scaledIcon;
if (iconRect.size() != iconSize) {
// We could use cairo_scale() here but cairo/pixman downscale quality is quite bad.
- GRefPtr<GdkPixbuf> scaledIcon = gdk_pixbuf_scale_simple(icon, iconRect.width(), iconRect.height(),
- GDK_INTERP_BILINEAR);
+ scaledIcon = adoptGRef(gdk_pixbuf_scale_simple(icon, iconRect.width(), iconRect.height(),
+ GDK_INTERP_BILINEAR));
icon = scaledIcon.get();
}
Modified: trunk/Source/WebKit/gtk/ChangeLog (122232 => 122233)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-07-10 17:03:51 UTC (rev 122232)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-07-10 17:05:24 UTC (rev 122233)
@@ -1,3 +1,16 @@
+2012-07-10 Sudarsana Nagineni <[email protected]>
+
+ [GTK] Fix memory leaks by adopting allocation of GdkPixbuf
+ https://bugs.webkit.org/show_bug.cgi?id=90790
+
+ Reviewed by Carlos Garcia Campos.
+
+ Fixed a memory leak in WebKitFaviconDatabase by adopting an
+ allocation of GdkPixbuf.
+
+ * webkit/webkitfavicondatabase.cpp:
+ (getIconPixbufSynchronously):
+
2012-07-10 Adam Barth <[email protected]>
LayoutTestController.dumpConfigurationForViewport should move to Internals
Modified: trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp (122232 => 122233)
--- trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp 2012-07-10 17:03:51 UTC (rev 122232)
+++ trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp 2012-07-10 17:05:24 UTC (rev 122233)
@@ -407,7 +407,7 @@
int pixbufWidth = gdk_pixbuf_get_width(pixbuf.get());
int pixbufHeight = gdk_pixbuf_get_height(pixbuf.get());
if (!iconSize.isZero() && (pixbufWidth != iconSize.width() || pixbufHeight != iconSize.height()))
- pixbuf = gdk_pixbuf_scale_simple(pixbuf.get(), iconSize.width(), iconSize.height(), GDK_INTERP_BILINEAR);
+ pixbuf = adoptGRef(gdk_pixbuf_scale_simple(pixbuf.get(), iconSize.width(), iconSize.height(), GDK_INTERP_BILINEAR));
return pixbuf.leakRef();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes