Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a3aa44e96f032ef315fb1a42c7313704162389bf
https://github.com/WebKit/WebKit/commit/a3aa44e96f032ef315fb1a42c7313704162389bf
Author: Fujii Hironori <[email protected]>
Date: 2026-01-13 (Tue, 13 Jan 2026)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebXR.cpp
Log Message:
-----------
[TestWebKitAPI][GLib] g_assert_cmpstr: warning: temporary whose address is
used as value of local variable '__s2' will be destroyed at the end of the
full-expression [-Wdangling]
https://bugs.webkit.org/show_bug.cgi?id=305348
Reviewed by Carlos Garcia Campos.
Because g_assert_cmpstr is a macro not a function, the following code doesn't
retain the life time of a CString returned by str.utf8() by the end of the
macro.
> g_assert_cmpstr(str.utf8().data(), ==, "xyz");
Use ASSERT_CMP_CSTRING and CString to fix the problems.
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp:
(testNavigationPolicy):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebXR.cpp:
(testWebKitXRPermissionRequest):
(testWebKitXRHitTest):
Canonical link: https://commits.webkit.org/305503@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications