Skip to content

Commit

Permalink
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: warning: lambda c…
Browse files Browse the repository at this point in the history
…apture 'thisPointerForLog' is not used

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

Reviewed by Ross Kirsling.

clang-cl reported the following warnings for Windows port.

> WebKit\Platform\IPC\win\ConnectionWin.cpp(332,10): warning: variable 'result' set but not used [-Wunused-but-set-variable]
> WebKit\WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp(170,325): warning: lambda capture 'thisPointerForLog' is not used [-Wunused-lambda-capture]

* Source/WebKit/Platform/IPC/win/ConnectionWin.cpp:
(IPC::Connection::EventListener::open):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Canonical link: https://commits.webkit.org/266993@main
  • Loading branch information
fujii committed Aug 17, 2023
1 parent 1b2a91b commit dc38df8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebKit/Platform/IPC/win/ConnectionWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void Connection::EventListener::open(Function<void()>&& handler)

BOOL result;
result = ::RegisterWaitForSingleObject(&m_waitHandle, m_state.hEvent, callback, this, INFINITE, WT_EXECUTEDEFAULT);
ASSERT(result);
ASSERT_UNUSED(result, result);
}

void Connection::EventListener::callback(void* data, BOOLEAN timerOrWaitFired)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const Navigat

ASSERT(policyDecisionMode == PolicyDecisionMode::Asynchronous);
webPage->sendWithAsyncReply(Messages::WebPageProxy::DecidePolicyForNavigationActionAsync(m_frame->info(), documentLoader ? documentLoader->navigationID() : 0, navigationActionData, originatingFrameInfoData, originatingPageID, navigationAction.resourceRequest(), request, IPC::FormDataReference { request.httpBody() }), [thisPointerForLog = this, frame = m_frame, listenerID, requestIdentifier] (PolicyDecision&& policyDecision) {
#if RELEASE_LOG_DISABLED
UNUSED_PARAM(thisPointerForLog);
#endif
RELEASE_LOG(Network, WebFrameLoaderClient_PREFIX_PARAMETERS "dispatchDecidePolicyForNavigationAction: Got policyAction %u from async IPC", thisPointerForLog, frame.ptr(), frame->frameID().object().toUInt64(), frame->page(), frame->page() ? frame->page()->identifier().toUInt64() : 0, (unsigned)policyDecision.policyAction);

frame->didReceivePolicyDecision(listenerID, requestIdentifier, WTFMove(policyDecision));
Expand Down

0 comments on commit dc38df8

Please sign in to comment.