REGRESSION (r84160): Leak of OpaqueJSString under WTR::JSTestRunner::pathToLocalResou...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 May 2019 23:24:10 +0000 (23:24 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 May 2019 23:24:10 +0000 (23:24 +0000)
<https://webkit.org/b/197965>

Reviewed by Joseph Pecoraro.

* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
(WTR::TestRunner::pathToLocalResource): Don't call
JSStringRetain() here because the JSRetainPtr<JSStringRef>
return type will increment the retain count for us.

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

Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm

index fe34eef..f5ad466 100644 (file)
@@ -1,3 +1,15 @@
+2019-05-16  David Kilzer  <ddkilzer@apple.com>
+
+        REGRESSION (r84160): Leak of OpaqueJSString under WTR::JSTestRunner::pathToLocalResource (32 bytes) in com.apple.WebKit.WebContent running layout tests
+        <https://webkit.org/b/197965>
+
+        Reviewed by Joseph Pecoraro.
+
+        * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
+        (WTR::TestRunner::pathToLocalResource): Don't call
+        JSStringRetain() here because the JSRetainPtr<JSStringRef>
+        return type will increment the retain count for us.
+
 2019-05-16  Alex Christensen  <achristensen@webkit.org>
 
         Add a unit test for client certificate authentication
index 0486dc8..403f4ff 100644 (file)
@@ -38,7 +38,7 @@ void TestRunner::platformInitialize()
 
 JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
 {
-    return JSStringRetain(url); // Do nothing on mac.
+    return url; // Do nothing on Cocoa.
 }
 
 JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()