Fix memory leak introduced in r257726
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Mar 2020 01:22:34 +0000 (01:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Mar 2020 01:22:34 +0000 (01:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=208399

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-23
Reviewed by John Wilander.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::websiteDataStore):
We were leaking page configurations.

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

Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp

index 721eb05..b8c43d7 100644 (file)
@@ -1,3 +1,14 @@
+2020-03-23  Alex Christensen  <achristensen@webkit.org>
+
+        Fix memory leak introduced in r257726
+        https://bugs.webkit.org/show_bug.cgi?id=208399
+
+        Reviewed by John Wilander.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::websiteDataStore):
+        We were leaking page configurations.
+
 2020-03-23  John Wilander  <wilander@apple.com>
 
         Add the capability to change all of a website's cookies to SameSite=Strict
index ba9829f..3371270 100644 (file)
@@ -550,7 +550,7 @@ WKWebsiteDataStoreRef TestController::defaultWebsiteDataStore()
 
 WKWebsiteDataStoreRef TestController::websiteDataStore()
 {
-    return WKPageConfigurationGetWebsiteDataStore(WKPageCopyPageConfiguration(m_mainWebView->page()));
+    return WKPageConfigurationGetWebsiteDataStore(adoptWK(WKPageCopyPageConfiguration(m_mainWebView->page())).get());
 }
 
 WKRetainPtr<WKPageConfigurationRef> TestController::generatePageConfiguration(const TestOptions& options)