Skip to content

Commit

Permalink
Add the ability for the IPCTestingAPI to report when a sync stream me…
Browse files Browse the repository at this point in the history
…ssage fails to be deserialized correctly

https://bugs.webkit.org/show_bug.cgi?id=264810
rdar://118391408

Reviewed by Alex Christensen.

Add the ability for the IPCTestingAPI to report when a sync stream connection
message fails to be received correctly. The existing behaviour is that no reply
is returned for failed messages. This change records the decoder validity
on failure into a MessageSyncReply so that the IPCTestingAPI can raise
an exception.

* LayoutTests/ipc/ignoreinvalidmessagesfortesting-stream-connection-expected.txt: Added.
* LayoutTests/ipc/ignoreinvalidmessagesfortesting-stream-connection.html: Added.
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::createRenderingBackend):
(WebKit::GPUConnectionToWebProcess::createGraphicsContextGL):
(WebKit::GPUConnectionToWebProcess::createRemoteGPU):
* Source/WebKit/Platform/IPC/HandleMessage.h:
(IPC::handleMessageSynchronous):
* Source/WebKit/Platform/IPC/StreamServerConnection.cpp:
(IPC::StreamServerConnection::tryCreate):
(IPC::StreamServerConnection::dispatchStreamMessage):
(IPC::StreamServerConnection::dispatchOutOfStreamMessage):
(IPC::StreamServerConnection::sendDeserializationErrorSyncReply):
* Source/WebKit/Platform/IPC/StreamServerConnection.h:
* Source/WebKit/Shared/IPCStreamTester.cpp:
(WebKit::IPCStreamTester::IPCStreamTester):
(WebKit::IPCStreamTester::syncMessageEmptyReply):
* Source/WebKit/Shared/IPCStreamTester.h:
* Source/WebKit/Shared/IPCStreamTester.messages.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp:
(TestWebKitAPI::TEST_F):

Canonical link: https://commits.webkit.org/270892@main
  • Loading branch information
gavin-apple committed Nov 17, 2023
1 parent 4dacd4a commit 56b0d92
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

PASS Sending sync stream message with incorrect parameters to the UI process shouldn't crash when IPCTestingAPI is enabled
PASS Sending sync stream message with incorrect parameters to the GPU process shouldn't crash when IPCTestingAPI is enabled

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!doctype html><!-- webkit-test-runner [ IPCTestingAPIEnabled=true ] -->
<title>Test that sending invalid messages via the IPC testing StreamConnectoin API doesn't kill the receiver</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<body>
<script>
const defaultTimeout = 1000;
const bufferSizeLog2 = 9;
const streamTesterID = 447;

promise_test(async t => {
if (!window.IPC)
return;

const [streamConnection, serverConnectionHandle] = IPC.createStreamClientConnection(bufferSizeLog2);
streamConnection.open();
IPC.sendMessage("UI", 0, IPC.messages.IPCTester_CreateStreamTester.name, [
{ type: 'uint64_t', value: streamTesterID },
{ type: 'StreamServerConnectionHandle', value: serverConnectionHandle },
]);
const arguments = streamConnection.waitForMessage(streamTesterID, IPC.messages.IPCStreamTesterProxy_WasCreated.name, defaultTimeout);
streamConnection.setSemaphores(arguments[0].value, arguments[1].value);

// Test starts here.
try {
assert_throws_js(TypeError,
() => { streamConnection.sendSyncMessage(streamTesterID, IPC.messages.IPCStreamTester_SyncMessageEmptyReply.name, defaultTimeout, [ ]) },
`failed sync message must throw error`);
} finally {
IPC.sendSyncMessage("UI", 0, IPC.messages.IPCTester_ReleaseStreamTester.name, defaultTimeout, [{ type: 'uint64_t', value: streamTesterID }]);
streamConnection.invalidate();
}

}, "Sending sync stream message with incorrect parameters to the UI process shouldn't crash when IPCTestingAPI is enabled");

promise_test(async t => {
if (!window.IPC)
return;

const [streamConnection, serverConnectionHandle] = IPC.createStreamClientConnection(bufferSizeLog2);
streamConnection.open();
IPC.sendMessage("GPU", 0, IPC.messages.IPCTester_CreateStreamTester.name, [
{ type: 'uint64_t', value: streamTesterID },
{ type: 'StreamServerConnectionHandle', value: serverConnectionHandle },
]);
const arguments = streamConnection.waitForMessage(streamTesterID, IPC.messages.IPCStreamTesterProxy_WasCreated.name, defaultTimeout);
streamConnection.setSemaphores(arguments[0].value, arguments[1].value);

// Test starts here.
try {
assert_throws_js(TypeError,
() => { streamConnection.sendSyncMessage(streamTesterID, IPC.messages.IPCStreamTester_SyncMessageEmptyReply.name, defaultTimeout, [ ]) },
`failed sync message must throw error`);
} finally {
IPC.sendSyncMessage("GPU", 0, IPC.messages.IPCTester_ReleaseStreamTester.name, defaultTimeout, [{ type: 'uint64_t', value: streamTesterID }]);
streamConnection.invalidate();
}

}, "Sending sync stream message with incorrect parameters to the GPU process shouldn't crash when IPCTestingAPI is enabled");

</script>
18 changes: 15 additions & 3 deletions Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,11 @@ RemoteImageDecoderAVFProxy& GPUConnectionToWebProcess::imageDecoderAVFProxy()

void GPUConnectionToWebProcess::createRenderingBackend(RemoteRenderingBackendCreationParameters&& creationParameters, IPC::StreamServerConnection::Handle&& connectionHandle)
{
auto streamConnection = IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle));
IPC::StreamServerConnectionParameters params;
#if ENABLE(IPC_TESTING_API)
params.ignoreInvalidMessageForTesting = connection().ignoreInvalidMessageForTesting();
#endif
auto streamConnection = IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle), params);
MESSAGE_CHECK(streamConnection);

auto addResult = m_remoteRenderingBackendMap.ensure(creationParameters.identifier, [&, streamConnection = WTFMove(streamConnection)] () mutable {
Expand Down Expand Up @@ -628,7 +632,11 @@ void GPUConnectionToWebProcess::createGraphicsContextGL(WebCore::GraphicsContext
return;
auto* renderingBackend = it->value.get();

auto streamConnection = IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle));
IPC::StreamServerConnectionParameters params;
#if ENABLE(IPC_TESTING_API)
params.ignoreInvalidMessageForTesting = connection().ignoreInvalidMessageForTesting();
#endif
auto streamConnection = IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle), params);
MESSAGE_CHECK(streamConnection);

auto addResult = m_remoteGraphicsContextGLMap.ensure(graphicsContextGLIdentifier, [&, streamConnection = WTFMove(streamConnection)] () mutable {
Expand Down Expand Up @@ -679,7 +687,11 @@ void GPUConnectionToWebProcess::createRemoteGPU(WebGPUIdentifier identifier, Ren
return;
auto* renderingBackend = it->value.get();

auto streamConnection = IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle));
IPC::StreamServerConnectionParameters params;
#if ENABLE(IPC_TESTING_API)
params.ignoreInvalidMessageForTesting = connection().ignoreInvalidMessageForTesting();
#endif
auto streamConnection = IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle), params);
MESSAGE_CHECK(streamConnection);

auto addResult = m_remoteGPUMap.ensure(identifier, [&, streamConnection = WTFMove(streamConnection)] () mutable {
Expand Down
6 changes: 5 additions & 1 deletion Source/WebKit/Platform/IPC/HandleMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,12 @@ void handleMessageSynchronous(StreamServerConnection& connection, Decoder& decod
return;

auto arguments = decoder.decode<typename MessageType::Arguments>();
if (UNLIKELY(!arguments))
if (UNLIKELY(!arguments)) {
#if ENABLE(IPC_TESTING_API)
connection.sendDeserializationErrorSyncReply(syncRequestID);
#endif
return;
}

static_assert(std::is_same_v<typename ValidationType::CompletionHandlerArguments, typename MessageType::ReplyArguments>);
using CompletionHandlerType = typename ValidationType::CompletionHandlerType;
Expand Down
26 changes: 25 additions & 1 deletion Source/WebKit/Platform/IPC/StreamServerConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@

namespace IPC {

RefPtr<StreamServerConnection> StreamServerConnection::tryCreate(Handle&& handle)
RefPtr<StreamServerConnection> StreamServerConnection::tryCreate(Handle&& handle, const StreamServerConnectionParameters& params)
{
auto buffer = StreamServerConnectionBuffer::map(WTFMove(handle.buffer));
if (!buffer)
return { };

auto connection = IPC::Connection::createClientConnection(IPC::Connection::Identifier { WTFMove(handle.outOfStreamConnection) });

#if ENABLE(IPC_TESTING_API)
if (params.ignoreInvalidMessageForTesting)
connection->setIgnoreInvalidMessageForTesting();
#endif

return adoptRef(*new StreamServerConnection(WTFMove(connection), WTFMove(*buffer)));
}

Expand Down Expand Up @@ -204,6 +210,10 @@ bool StreamServerConnection::dispatchStreamMessage(Decoder&& decoder, StreamMess
receiver.didReceiveStreamMessage(*this, decoder);
m_isDispatchingStreamMessage = false;
if (!decoder.isValid()) {
#if ENABLE(IPC_TESTING_API)
if (m_connection->ignoreInvalidMessageForTesting())
return false;
#endif // ENABLE(IPC_TESTING_API)
m_connection->dispatchDidReceiveInvalidMessage(decoder.messageName());
return false;
}
Expand Down Expand Up @@ -238,6 +248,10 @@ bool StreamServerConnection::dispatchOutOfStreamMessage(Decoder&& decoder)
if (receiver) {
receiver->didReceiveStreamMessage(*this, *message);
if (!message->isValid()) {
#if ENABLE(IPC_TESTING_API)
if (m_connection->ignoreInvalidMessageForTesting())
return false;
#endif // ENABLE(IPC_TESTING_API)
m_connection->dispatchDidReceiveInvalidMessage(message->messageName());
return false;
}
Expand All @@ -251,4 +265,14 @@ bool StreamServerConnection::dispatchOutOfStreamMessage(Decoder&& decoder)
return true;
}

#if ENABLE(IPC_TESTING_API)
void StreamServerConnection::sendDeserializationErrorSyncReply(Connection::SyncRequestID syncRequestID)
{
auto encoder = makeUniqueRef<Encoder>(MessageName::SyncMessageReply, syncRequestID.toUInt64());
encoder->setSyncMessageDeserializationFailure();
m_connection->sendSyncReply(WTFMove(encoder));
}
#endif


}
12 changes: 11 additions & 1 deletion Source/WebKit/Platform/IPC/StreamServerConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ struct StreamServerConnectionHandle {
StreamConnectionBuffer::Handle buffer;
};

struct StreamServerConnectionParameters {
#if ENABLE(IPC_TESTING_API)
bool ignoreInvalidMessageForTesting { false };
#endif
};

// StreamServerConnection represents the connection between stream client and server, as used by the server.
//
// StreamServerConnection:
Expand All @@ -68,7 +74,7 @@ class StreamServerConnection final : public ThreadSafeRefCounted<StreamServerCon
using AsyncReplyID = Connection::AsyncReplyID;
using Handle = StreamServerConnectionHandle;

static RefPtr<StreamServerConnection> tryCreate(Handle&&);
static RefPtr<StreamServerConnection> tryCreate(Handle&&, const StreamServerConnectionParameters&);
~StreamServerConnection() final;

void startReceivingMessages(StreamMessageReceiver&, ReceiverName, uint64_t destinationID);
Expand All @@ -91,6 +97,10 @@ class StreamServerConnection final : public ThreadSafeRefCounted<StreamServerCon
template<typename T, typename... Arguments>
void sendSyncReply(Connection::SyncRequestID, Arguments&&...);

#if ENABLE(IPC_TESTING_API)
void sendDeserializationErrorSyncReply(Connection::SyncRequestID);
#endif

template<typename T, typename... Arguments>
void sendAsyncReply(AsyncReplyID, Arguments&&...);

Expand Down
13 changes: 9 additions & 4 deletions Source/WebKit/Shared/IPCStreamTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@

namespace WebKit {

RefPtr<IPCStreamTester> IPCStreamTester::create(IPCStreamTesterIdentifier identifier, IPC::StreamServerConnection::Handle&& connectionHandle)
RefPtr<IPCStreamTester> IPCStreamTester::create(IPCStreamTesterIdentifier identifier, IPC::StreamServerConnection::Handle&& connectionHandle, bool ignoreInvalidMessageForTesting)
{
auto tester = adoptRef(*new IPCStreamTester(identifier, WTFMove(connectionHandle)));
auto tester = adoptRef(*new IPCStreamTester(identifier, WTFMove(connectionHandle), ignoreInvalidMessageForTesting));
tester->initialize();
return tester;
}

IPCStreamTester::IPCStreamTester(IPCStreamTesterIdentifier identifier, IPC::StreamServerConnection::Handle&& connectionHandle)
IPCStreamTester::IPCStreamTester(IPCStreamTesterIdentifier identifier, IPC::StreamServerConnection::Handle&& connectionHandle, bool ignoreInvalidMessageForTesting)
: m_workQueue(IPC::StreamConnectionWorkQueue::create("IPCStreamTester work queue"))
, m_streamConnection(IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle)).releaseNonNull())
, m_streamConnection(IPC::StreamServerConnection::tryCreate(WTFMove(connectionHandle), { ignoreInvalidMessageForTesting }).releaseNonNull())
, m_identifier(identifier)
{
}
Expand Down Expand Up @@ -93,6 +93,11 @@ void IPCStreamTester::syncMessageReturningSharedMemory1(uint32_t byteCount, Comp
completionHandler(WTFMove(result));
}

void IPCStreamTester::syncMessageEmptyReply(uint32_t, CompletionHandler<void()>&& completionHandler)
{
completionHandler();
}

void IPCStreamTester::syncCrashOnZero(int32_t value, CompletionHandler<void(int32_t)>&& completionHandler)
{
if (!value) {
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKit/Shared/IPCStreamTester.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,20 @@ namespace WebKit {
// Interface to test various IPC stream related activities.
class IPCStreamTester final : public IPC::StreamMessageReceiver {
public:
static RefPtr<IPCStreamTester> create(IPCStreamTesterIdentifier, IPC::StreamServerConnection::Handle&&);
static RefPtr<IPCStreamTester> create(IPCStreamTesterIdentifier, IPC::StreamServerConnection::Handle&&, bool ignoreInvalidMessageForTesting);
void stopListeningForIPC(Ref<IPCStreamTester>&& refFromConnection);

// IPC::StreamMessageReceiver overrides.
void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
private:
IPCStreamTester(IPCStreamTesterIdentifier, IPC::StreamServerConnection::Handle&&);
IPCStreamTester(IPCStreamTesterIdentifier, IPC::StreamServerConnection::Handle&&, bool ignoreInvalidMessageForTesting);
~IPCStreamTester();
void initialize();
IPC::StreamConnectionWorkQueue& workQueue() const { return m_workQueue; }

// Messages.
void syncMessageReturningSharedMemory1(uint32_t byteCount, CompletionHandler<void(std::optional<SharedMemory::Handle>&&)>&&);
void syncMessageEmptyReply(uint32_t, CompletionHandler<void()>&&);
void syncCrashOnZero(int32_t, CompletionHandler<void(int32_t)>&&);
void checkAutoreleasePool(CompletionHandler<void(int32_t)>&&);
void asyncMessage(bool value, CompletionHandler<void(bool)>&&);
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/Shared/IPCStreamTester.messages.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

messages -> IPCStreamTester NotRefCounted Stream {
SyncMessageReturningSharedMemory1(uint32_t byteCount) -> (std::optional<WebKit::SharedMemory::Handle> handle) Synchronous NotStreamEncodableReply
SyncMessageEmptyReply(uint32_t value) -> () Synchronous
SyncCrashOnZero(int32_t value) -> (int32_t sameValue) Synchronous

CheckAutoreleasePool() -> (int32_t previousUseCount) Synchronous
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/Shared/IPCTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ void IPCTester::stopMessageTesting(CompletionHandler<void()>&& completionHandler
completionHandler();
}

void IPCTester::createStreamTester(IPCStreamTesterIdentifier identifier, IPC::StreamServerConnection::Handle&& serverConnection)
void IPCTester::createStreamTester(IPC::Connection& connection, IPCStreamTesterIdentifier identifier, IPC::StreamServerConnection::Handle&& serverConnection)
{
auto addResult = m_streamTesters.ensure(identifier, [&] {
return IPC::ScopedActiveMessageReceiveQueue<IPCStreamTester> { IPCStreamTester::create(identifier, WTFMove(serverConnection)) };
return IPC::ScopedActiveMessageReceiveQueue<IPCStreamTester> { IPCStreamTester::create(identifier, WTFMove(serverConnection), connection.ignoreInvalidMessageForTesting()) };
});
ASSERT_UNUSED(addResult, addResult.isNewEntry || IPC::isTestingIPC());
}
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Shared/IPCTester.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class IPCTester final : public IPC::MessageReceiver {
// Messages.
void startMessageTesting(IPC::Connection&, String&& driverName);
void stopMessageTesting(CompletionHandler<void()>&&);
void createStreamTester(IPCStreamTesterIdentifier, IPC::StreamServerConnection::Handle&&);
void createStreamTester(IPC::Connection&, IPCStreamTesterIdentifier, IPC::StreamServerConnection::Handle&&);
void releaseStreamTester(IPCStreamTesterIdentifier, CompletionHandler<void()>&&);
void createConnectionTester(IPC::Connection&, IPCConnectionTesterIdentifier, IPC::Connection::Handle&&);
void createConnectionTesterAndSendAsyncMessages(IPC::Connection&, IPCConnectionTesterIdentifier, IPC::Connection::Handle&&, uint32_t messageCount);
Expand Down
4 changes: 4 additions & 0 deletions Source/WebKit/WebKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6270,6 +6270,8 @@
86E6E357291959C3006C25CA /* SecItemRequestData.serialization.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = SecItemRequestData.serialization.in; sourceTree = "<group>"; };
86EB7201298D310900C1DC77 /* SecItemShim.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecItemShim.cpp; sourceTree = "<group>"; };
86EB7202298D310900C1DC77 /* SecItemShim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecItemShim.h; sourceTree = "<group>"; };
86EFFA3F2B03A6B900ABE77D /* IPCStreamTester.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = IPCStreamTester.messages.in; sourceTree = "<group>"; };
86EFFA402B03A6B900ABE77D /* IPCTester.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = IPCTester.messages.in; sourceTree = "<group>"; };
86F4FE1E2A98B9AE007378EE /* RemoteGraphicsContextGLInitializationState.serialization.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteGraphicsContextGLInitializationState.serialization.in; sourceTree = "<group>"; };
86F4FE282A98C162007378EE /* SharedVideoFrame.serialization.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = SharedVideoFrame.serialization.in; sourceTree = "<group>"; };
86F9536018FF4FD4001DB2EF /* ProcessAssertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessAssertion.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -8435,10 +8437,12 @@
7BBA63DC280E93B500B04823 /* IPCConnectionTesterIdentifier.h */,
7BE37F9527C7CD90007A6CD3 /* IPCStreamTester.cpp */,
7BE37F9427C7CD51007A6CD3 /* IPCStreamTester.h */,
86EFFA3F2B03A6B900ABE77D /* IPCStreamTester.messages.in */,
7BE37F9227C7C518007A6CD3 /* IPCStreamTesterIdentifier.h */,
7B2DDD5E27CCD9710060ABAB /* IPCStreamTesterProxy.h */,
7B50E97F2771F6CE003DAAC4 /* IPCTester.cpp */,
7B50E9802771F6CF003DAAC4 /* IPCTester.h */,
86EFFA402B03A6B900ABE77D /* IPCTester.messages.in */,
7BF19B60290FC5B400EF322A /* IPCTesterReceiver.cpp */,
7BF19B5F290FC5B400EF322A /* IPCTesterReceiver.h */,
1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */,
Expand Down
6 changes: 3 additions & 3 deletions Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ TEST_F(StreamConnectionTest, OpenConnections)
auto connectionPair = IPC::StreamClientConnection::create(defaultBufferSizeLog2);
ASSERT_TRUE(!!connectionPair);
auto [clientConnection, serverConnectionHandle] = WTFMove(*connectionPair);
auto serverConnection = IPC::StreamServerConnection::tryCreate(WTFMove(serverConnectionHandle)).releaseNonNull();
auto serverConnection = IPC::StreamServerConnection::tryCreate(WTFMove(serverConnectionHandle), { }).releaseNonNull();
auto cleanup = localReferenceBarrier();
MockMessageReceiver mockClientReceiver;
clientConnection->open(mockClientReceiver);
Expand All @@ -233,7 +233,7 @@ TEST_F(StreamConnectionTest, InvalidateUnopened)
auto connectionPair = IPC::StreamClientConnection::create(defaultBufferSizeLog2);
ASSERT_TRUE(!!connectionPair);
auto [clientConnection, serverConnectionHandle] = WTFMove(*connectionPair);
auto serverConnection = IPC::StreamServerConnection::tryCreate(WTFMove(serverConnectionHandle)).releaseNonNull();
auto serverConnection = IPC::StreamServerConnection::tryCreate(WTFMove(serverConnectionHandle), { }).releaseNonNull();
auto cleanup = localReferenceBarrier();
serverQueue().dispatch([this, serverConnection] {
assertIsCurrent(serverQueue());
Expand All @@ -255,7 +255,7 @@ class StreamMessageTest : public ::testing::TestWithParam<std::tuple<unsigned>>,
auto connectionPair = IPC::StreamClientConnection::create(bufferSizeLog2());
ASSERT(!!connectionPair);
auto [clientConnection, serverConnectionHandle] = WTFMove(*connectionPair);
auto serverConnection = IPC::StreamServerConnection::tryCreate(WTFMove(serverConnectionHandle)).releaseNonNull();
auto serverConnection = IPC::StreamServerConnection::tryCreate(WTFMove(serverConnectionHandle), { }).releaseNonNull();
m_clientConnection = WTFMove(clientConnection);
m_clientConnection->setSemaphores(copyViaEncoder(serverQueue().wakeUpSemaphore()).value(), copyViaEncoder(serverConnection->clientWaitSemaphore()).value());
m_clientConnection->open(m_mockClientReceiver);
Expand Down

0 comments on commit 56b0d92

Please sign in to comment.