REGRESSION(r237031): [GTK] Test /webkit/WebKitWebView/settings is failing
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2018 10:46:38 +0000 (10:46 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2018 10:46:38 +0000 (10:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191225

Reviewed by Alejandro G. Castro.

Fix a memory leak causing this test to fail.

* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::initializeWebView):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp

index 8599985..de274f3 100644 (file)
@@ -1,3 +1,15 @@
+2018-11-05  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        REGRESSION(r237031): [GTK] Test /webkit/WebKitWebView/settings is failing
+        https://bugs.webkit.org/show_bug.cgi?id=191225
+
+        Reviewed by Alejandro G. Castro.
+
+        Fix a memory leak causing this test to fail.
+
+        * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
+        (WebViewTest::initializeWebView):
+
 2018-11-04  Zan Dobersek  <zdobersek@igalia.com>
 
         [webkitpy] Support WPE in the run-web-platform-tests script
index 7e3540b..99942c1 100644 (file)
@@ -49,14 +49,14 @@ void WebViewTest::initializeWebView()
 {
     g_assert(!m_webView);
 
-    WebKitSettings* webkitSettings = webkit_settings_new();
-    webkit_settings_set_enable_media_stream(webkitSettings, TRUE);
+    GRefPtr<WebKitSettings> settings = adoptGRef(webkit_settings_new());
+    webkit_settings_set_enable_media_stream(settings.get(), TRUE);
 
     m_webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
 #if PLATFORM(WPE)
         "backend", Test::createWebViewBackend(),
 #endif
-        "settings", webkitSettings,
+        "settings", settings.get(),
         "web-context", m_webContext.get(),
         "user-content-manager", m_userContentManager.get(),
         nullptr));