[Webkit-unassigned] [Bug 252059] [run-webkit-tests] found several memory leak while running with --world-leaks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 20 10:47:38 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=252059

cathiechen <cathiechen at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.webkit.org/sho
                   |                            |w_bug.cgi?id=251834

--- Comment #3 from cathiechen <cathiechen at igalia.com> ---
[1] https://bugs.webkit.org/show_bug.cgi?id=251834

Looks like [1] introduced this.
Yes, before this change, run-webkit-tests with --world-leaks crashes.
I used below to work around it temporarily.

diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 9f9bf7fa7e3e..b808251b7b56 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -1784,8 +1784,10 @@ void TestController::didReceiveLiveDocumentsList(WKArrayRef liveDocumentList)

     HashMap<uint64_t, String> documentInfo;
     for (size_t i = 0; i < numDocuments; ++i) {
-        if (auto dictionary = dictionaryValue(WKArrayGetItemAtIndex(liveDocumentList, i)))
-            documentInfo.add(uint64Value(dictionary, "id"), toWTFString(stringValue(dictionary, "url")));
+        if (auto dictionary = dictionaryValue(WKArrayGetItemAtIndex(liveDocumentList, i))) {
+            if (auto id = uint64Value(dictionary, "id"))
+                documentInfo.add(id, toWTFString(stringValue(dictionary, "url")));
+        }
     }

     if (!documentInfo.size()) {

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230220/f40c4e60/attachment.htm>


More information about the webkit-unassigned mailing list