Title: [274543] trunk/Tools
Revision
274543
Author
wilan...@apple.com
Date
2021-03-16 17:54:17 -0700 (Tue, 16 Mar 2021)

Log Message

PCM: Use adoptWK in TestInvocation::didReceiveSynchronousMessageFromInjectedBundle()'s handling of "SetPrivateClickMeasurementAttributionReportURLsForTesting"
https://bugs.webkit.org/show_bug.cgi?id=223286
<rdar://problem/75498336>

Reviewed by Darin Adler.

See Darin's initial comment here: https://bugs.webkit.org/show_bug.cgi?id=223238#c9

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (274542 => 274543)


--- trunk/Tools/ChangeLog	2021-03-17 00:53:41 UTC (rev 274542)
+++ trunk/Tools/ChangeLog	2021-03-17 00:54:17 UTC (rev 274543)
@@ -1,3 +1,16 @@
+2021-03-16  John Wilander  <wilan...@apple.com>
+
+        PCM: Use adoptWK in TestInvocation::didReceiveSynchronousMessageFromInjectedBundle()'s handling of "SetPrivateClickMeasurementAttributionReportURLsForTesting"
+        https://bugs.webkit.org/show_bug.cgi?id=223286
+        <rdar://problem/75498336>
+
+        Reviewed by Darin Adler.
+
+        See Darin's initial comment here: https://bugs.webkit.org/show_bug.cgi?id=223238#c9
+
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+
 2021-03-16  Jonathan Bedard  <jbed...@apple.com>
 
         [resultsdbpy] Save identifiers in commit table

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (274542 => 274543)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2021-03-17 00:53:41 UTC (rev 274542)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2021-03-17 00:54:17 UTC (rev 274543)
@@ -1354,9 +1354,9 @@
 
     if (WKStringIsEqualToUTF8CString(messageName, "SetPrivateClickMeasurementAttributionReportURLsForTesting")) {
         auto testDictionary = dictionaryValue(messageBody);
-        auto sourceURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "SourceURLString")).utf8().data());
-        auto attributeOnURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "AttributeOnURLString")).utf8().data());
-        TestController::singleton().setPrivateClickMeasurementAttributionReportURLsForTesting(sourceURL, attributeOnURL);
+        auto sourceURL = adoptWK(WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "SourceURLString")).utf8().data()));
+        auto attributeOnURL = adoptWK(WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "AttributeOnURLString")).utf8().data()));
+        TestController::singleton().setPrivateClickMeasurementAttributionReportURLsForTesting(sourceURL.get(), attributeOnURL.get());
         return nullptr;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to