Bug 315305

Summary: Unreviewed, Windows build fix for unused lambda capture in WebLocalFrameLoaderClient::didCacheBackForwardItem
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: New BugsAssignee: Basuke Suzuki <basuke>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Basuke Suzuki
Reported 2026-05-21 10:32:36 PDT
After https://commits.webkit.org/313625@main (b776e22550fb), the Windows build fails with: UnifiedSource-WebProcess-25.cpp: WebLocalFrameLoaderClient.cpp(1749,91): error: lambda capture 'itemID' is not used [-Werror,-Wunused-lambda-capture] webPage->sendWithAsyncReply(Messages::WebPageProxy::DidCacheBackForwardItem(itemID), [itemID, frameItemID](bool success) { ^~~~~~~ The lambda only references itemID inside RELEASE_LOG_ERROR, which expands to no-op on Windows, so the capture appears unused under -Wunused-lambda-capture. Fix: add UNUSED_PARAM(itemID) at the start of the lambda body to keep the log information for ports where RELEASE_LOG_ERROR is active and silence the warning where it is not.
Attachments
Basuke Suzuki
Comment 1 2026-05-21 10:35:50 PDT
*** This bug has been marked as a duplicate of bug 315299 ***
Note You need to log in before you can comment on or make changes to this bug.