From ebd7f4c176fdcb406986081c58183e07ecbae24e Mon Sep 17 00:00:00 2001 From: stasoid Date: Sat, 15 Feb 2025 13:31:31 +0500 Subject: [PATCH] WebContent: Replace static_assert IPC fixmes with comments Fixes compilation errors on Windows --- Services/WebContent/WebDriverConnection.cpp | 2 +- Services/WebContent/main.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Services/WebContent/WebDriverConnection.cpp b/Services/WebContent/WebDriverConnection.cpp index 16f81ccacec..d6a90062ed8 100644 --- a/Services/WebContent/WebDriverConnection.cpp +++ b/Services/WebContent/WebDriverConnection.cpp @@ -188,7 +188,7 @@ static bool fire_an_event(FlyString const& name, Optional ta ErrorOr> WebDriverConnection::connect(Web::PageClient& page_client, ByteString const& webdriver_ipc_path) { - static_assert(IsSame, "Need to handle other IPC transports here"); + // TODO: Mach IPC and Windows IPC dbgln_if(WEBDRIVER_DEBUG, "Trying to connect to {}", webdriver_ipc_path); auto socket = TRY(Core::LocalSocket::connect(webdriver_ipc_path)); diff --git a/Services/WebContent/main.cpp b/Services/WebContent/main.cpp index 0ae19e324b9..cabe2e7d512 100644 --- a/Services/WebContent/main.cpp +++ b/Services/WebContent/main.cpp @@ -210,7 +210,7 @@ ErrorOr serenity_main(Main::Arguments arguments) if (maybe_content_filter_error.is_error()) dbgln("Failed to load content filters: {}", maybe_content_filter_error.error()); - static_assert(IsSame, "Need to handle other IPC transports here"); + // TODO: Mach IPC auto webcontent_socket = TRY(Core::take_over_socket_from_system_server("WebContent"sv)); auto webcontent_client = TRY(WebContent::ConnectionFromClient::try_create(make(move(webcontent_socket)))); @@ -250,7 +250,7 @@ static ErrorOr load_content_filters(StringView config_path) ErrorOr initialize_resource_loader(GC::Heap& heap, int request_server_socket) { - static_assert(IsSame, "Need to handle other IPC transports here"); + // TODO: Mach IPC auto socket = TRY(Core::LocalSocket::adopt_fd(request_server_socket)); TRY(socket->set_blocking(true)); @@ -267,7 +267,7 @@ ErrorOr initialize_resource_loader(GC::Heap& heap, int request_server_sock ErrorOr initialize_image_decoder(int image_decoder_socket) { - static_assert(IsSame, "Need to handle other IPC transports here"); + // TODO: Mach IPC auto socket = TRY(Core::LocalSocket::adopt_fd(image_decoder_socket)); TRY(socket->set_blocking(true)); @@ -284,7 +284,7 @@ ErrorOr initialize_image_decoder(int image_decoder_socket) ErrorOr reinitialize_image_decoder(IPC::File const& image_decoder_socket) { - static_assert(IsSame, "Need to handle other IPC transports here"); + // TODO: Mach IPC auto socket = TRY(Core::LocalSocket::adopt_fd(image_decoder_socket.take_fd())); TRY(socket->set_blocking(true));