[webkit-changes] [WebKit/WebKit] c4c9eb: IPC::StreamServerConnection lacks send()

Kimmo Kinnunen noreply at github.com
Wed Sep 14 10:40:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c4c9eb9732f57b4283201a304f5bb8fb1bffd4e9
      https://github.com/WebKit/WebKit/commit/c4c9eb9732f57b4283201a304f5bb8fb1bffd4e9
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2022-09-14 (Wed, 14 Sep 2022)

  Changed paths:
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h
    M Source/WebKit/Platform/IPC/StreamServerConnection.h
    M Source/WebKit/Shared/IPCStreamTester.cpp
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp

  Log Message:
  -----------
  IPC::StreamServerConnection lacks send()
https://bugs.webkit.org/show_bug.cgi?id=244971

Reviewed by Antti Koivisto.

Clients of IPC::StreamServerConnection should use the class itself,
not its implementation detail (connection()).
Add IPC::StreamServerConnection::send() that is supposed to send
messages through the connection. This way if the implementation changes,
the client sending code is already correct and unsuprising.

Uses this as an excuse to implement some tests for the Stream*Connection.

* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
(WebKit::RemoteGraphicsContextGL::send const):
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h:
* Source/WebKit/Platform/IPC/StreamServerConnection.h:
(IPC::StreamServerConnection::send):
* Source/WebKit/Shared/IPCStreamTester.cpp:
(WebKit::IPCStreamTester::initialize):
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp:
(TestWebKitAPI::StreamConnectionTest::StreamConnectionTest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::refViaEncoder): Deleted.

Canonical link: https://commits.webkit.org/254484@main




More information about the webkit-changes mailing list