Modified: trunk/Source/WebKit2/ChangeLog (126230 => 126231)
--- trunk/Source/WebKit2/ChangeLog 2012-08-22 00:14:41 UTC (rev 126230)
+++ trunk/Source/WebKit2/ChangeLog 2012-08-22 00:18:39 UTC (rev 126231)
@@ -1,3 +1,16 @@
+2012-08-21 Sudarsana Nagineni <[email protected]>
+
+ [GTK] [WK2] Memory leaks in TestWebKitFindController
+ https://bugs.webkit.org/show_bug.cgi?id=94627
+
+ Reviewed by Martin Robinson.
+
+ Fix memory leaks in TestWebKitFindController by using adoptGRef
+ instead of just getting new reference of GdkPixbuf.
+
+ * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
+ (testFindControllerHide):
+
2012-08-21 Alexey Proskuryakov <[email protected]>
<rdar://problem/11241850> Block access to xpcd in WebProcess.sb
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp (126230 => 126231)
--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp 2012-08-22 00:14:41 UTC (rev 126230)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp 2012-08-22 00:18:39 UTC (rev 126231)
@@ -312,7 +312,7 @@
g_assert(webViewGdkWindow);
test->waitUntilWebViewDrawSignal();
- GRefPtr<GdkPixbuf> originalPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
+ GRefPtr<GdkPixbuf> originalPixbuf = adoptGRef(gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth));
g_assert(originalPixbuf);
test->find("testing", WEBKIT_FIND_OPTIONS_NONE, 1);
@@ -320,7 +320,7 @@
g_assert(test->m_textFound);
test->waitUntilWebViewDrawSignal();
- GRefPtr<GdkPixbuf> highlightPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
+ GRefPtr<GdkPixbuf> highlightPixbuf = adoptGRef(gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth));
g_assert(highlightPixbuf);
g_assert(!gdkPixbufEqual(originalPixbuf.get(), highlightPixbuf.get()));
@@ -329,7 +329,7 @@
webkit_web_view_execute_editing_command(test->m_webView, "Unselect");
test->waitUntilWebViewDrawSignal();
- GRefPtr<GdkPixbuf> unhighlightPixbuf = gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth);
+ GRefPtr<GdkPixbuf> unhighlightPixbuf = adoptGRef(gdk_pixbuf_get_from_window(webViewGdkWindow, 0, 0, allocatedHeight, allocatedWidth));
g_assert(unhighlightPixbuf);
g_assert(gdkPixbufEqual(originalPixbuf.get(), unhighlightPixbuf.get()));
}