Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: bb615544285886057ad79e074fefe6bbf68c2292 https://github.com/WebKit/WebKit/commit/bb615544285886057ad79e074fefe6bbf68c2292 Author: Jean-Yves Avenard <j...@apple.com> Date: 2024-03-06 (Wed, 06 Mar 2024)
Changed paths: M Source/WebKit/Platform/IPC/Connection.cpp M Source/WebKit/Platform/IPC/Connection.h M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp Log Message: ----------- Simplify use of sendWithPromisedReplyOnDispatcher https://bugs.webkit.org/show_bug.cgi?id=270320 rdar://123857833 Reviewed by Kimmo Kinnunen. We can remove Connection::sendWithPromiseReplyOnDisPatcher and have Connection::sendWithPromisedReply perform the dispatching automatically. Using NativePromiseProducer::settleWithFunction we can set the callback that will decode the IPC's message and pass it to its listener on the thread the listener is asking to be called on. We can remove the RefPtr<RefCountedSerialFunctionDispatcher> from the AsyncReplyWithDispatcher structure and move the dispatching logic directly into the AsyncReplyHandler's CompletionHandler which will now receive a std::unique_ptr<Decoder> instead of a raw pointer. No change in observable behaviour, covered by existing tests. * Source/WebKit/Platform/IPC/Connection.cpp: (IPC::Connection::sendMessageWithAsyncReplyWithDispatcher): (IPC::Connection::processIncomingMessage): (IPC::Connection::addAsyncReplyHandlerWithDispatcher): (IPC::Connection::cancelAsyncReplyHandlers): (IPC::CompletionHandler<void): (IPC::Connection::takeAsyncReplyHandlerWithDispatcher): Deleted. (IPC::Connection::takeAsyncReplyHandlerWithDispatcherWithLockHeld): Deleted. * Source/WebKit/Platform/IPC/Connection.h: (IPC::Connection::sendWithAsyncReplyOnDispatcher): (IPC::Connection::sendWithPromisedReply): (IPC::Connection::makeAsyncReplyHandlerWithDispatcher): (IPC::Connection::AsyncReplyHandlerWithDispatcher::operator bool const): Deleted. * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: * Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp: (TestWebKitAPI::TEST_P): Canonical link: https://commits.webkit.org/275764@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes