[webkit-changes] [WebKit/WebKit] ff0da0: [WK2] Polish IPC::callMemberFunction(), completion...
Žan Doberšek
noreply at github.com
Wed Nov 23 05:34:13 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ff0da01502672fd664455452b504a5cc05fe6f25
https://github.com/WebKit/WebKit/commit/ff0da01502672fd664455452b504a5cc05fe6f25
Author: Žan Doberšek <zdobersek at igalia.com>
Date: 2022-11-23 (Wed, 23 Nov 2022)
Changed paths:
M Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm
M Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp
M Source/WebKit/Platform/IPC/HandleMessage.h
M Source/WebKit/webpushd/WebPushDaemon.mm
Log Message:
-----------
[WK2] Polish IPC::callMemberFunction(), completion handler validation in HandleMessage.h
https://bugs.webkit.org/show_bug.cgi?id=247846
Reviewed by Kimmo Kinnunen.
Change parameter sequence for IPC::callMemberFunction() overloads, with
the object and method pointers passed in first, and the other arguments
following in the order in which they are passed to that method
invocation.
Internally IPC::callMemberFunction() implementations are simplified,
using std::apply() to expand the passed-in tuple values that are then
used in the method call.
Throughout callMemberFunction() and different handle-message variants,
the member function pointer parameter type now immediately splits
between the class type of which the function pointer type is a member,
and the simplified function type. The latter also simplifies the
CompletionHandlerTypeDeduction template specializations.
Helper CompletionHandlerTypeDeduction template struct is tweaked so that
the parameter index is passed to the struct template, avoiding a
template alias internally.
CompletionHandlerValidation is simplified, a simple two-type template is
provided, and a specialization for two CompletionHandler types passes
validation as long as parameter types between the two CompletionHandler
types match once cv-qualifications and references are removed.
* Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm:
(WebKit::WebPushD::handleWebPushDaemonMessage):
* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp:
(WebKit::PCM::handlePCMMessage):
(WebKit::PCM::handlePCMMessageWithReply):
* Source/WebKit/Platform/IPC/HandleMessage.h:
(IPC::callMemberFunction):
(IPC::CompletionHandlerValidation<CompletionHandler<void):
(IPC::handleMessage):
(IPC::handleMessageWantsConnection):
(IPC::handleMessageSynchronous):
(IPC::handleMessageSynchronousWantsConnection):
(IPC::handleMessageAsync):
(IPC::handleMessageAsyncWantsConnection):
(IPC::callMemberFunctionImpl): Deleted.
(IPC::C::): Deleted.
(IPC::CompletionHandlerValidation::matchingParameters): Deleted.
(IPC::CompletionHandlerValidation::matchingTypes): Deleted.
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::handleWebPushDMessageWithReply):
(WebPushD::handleWebPushDMessage):
Canonical link: https://commits.webkit.org/256971@main
More information about the webkit-changes
mailing list