mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 08:48:57 +00:00
WebWorker: Enable in Windows CI
This commit is contained in:
parent
0a699132f3
commit
0847ca4854
Notes:
github-actions[bot]
2025-08-23 22:07:08 +00:00
Author: https://github.com/ayeteadoe
Commit: 0847ca4854
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5229
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 24 additions and 1 deletions
|
@ -20,3 +20,19 @@ add_executable(WebWorker main.cpp)
|
||||||
|
|
||||||
target_include_directories(WebWorker PRIVATE ${LADYBIRD_SOURCE_DIR})
|
target_include_directories(WebWorker PRIVATE ${LADYBIRD_SOURCE_DIR})
|
||||||
target_link_libraries(WebWorker PRIVATE webworkerservice)
|
target_link_libraries(WebWorker PRIVATE webworkerservice)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
# FIXME: This is a hack to get around lld-link error undefined symbols in various libraries
|
||||||
|
target_link_libraries(webworkerservice PRIVATE
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,CallbackType>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,DedicatedWorkerGlobalScope>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,EnvironmentSettingsSnapshot>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,EventNames>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,SharedWorkerGlobalScope>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Tracing>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,WorkerDebugConsoleClient>
|
||||||
|
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,WorkerLocation>
|
||||||
|
)
|
||||||
|
find_package(pthread REQUIRED)
|
||||||
|
target_include_directories(WebWorker PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
|
||||||
|
endif()
|
||||||
|
|
|
@ -84,7 +84,11 @@ ErrorOr<int> ladybird_main(Main::Arguments arguments)
|
||||||
|
|
||||||
static ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
|
static ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
|
||||||
{
|
{
|
||||||
|
#if !defined(AK_OS_WINDOWS)
|
||||||
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
|
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
|
||||||
|
#else
|
||||||
|
static_assert(IsSame<IPC::Transport, IPC::TransportSocketWindows>, "Need to handle other IPC transports here");
|
||||||
|
#endif
|
||||||
auto socket = TRY(Core::LocalSocket::adopt_fd(image_decoder_socket));
|
auto socket = TRY(Core::LocalSocket::adopt_fd(image_decoder_socket));
|
||||||
TRY(socket->set_blocking(true));
|
TRY(socket->set_blocking(true));
|
||||||
|
|
||||||
|
@ -101,8 +105,11 @@ static ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
|
||||||
|
|
||||||
static ErrorOr<void> initialize_resource_loader(GC::Heap& heap, int request_server_socket)
|
static ErrorOr<void> initialize_resource_loader(GC::Heap& heap, int request_server_socket)
|
||||||
{
|
{
|
||||||
|
#if !defined(AK_OS_WINDOWS)
|
||||||
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
|
static_assert(IsSame<IPC::Transport, IPC::TransportSocket>, "Need to handle other IPC transports here");
|
||||||
|
#else
|
||||||
|
static_assert(IsSame<IPC::Transport, IPC::TransportSocketWindows>, "Need to handle other IPC transports here");
|
||||||
|
#endif
|
||||||
auto socket = TRY(Core::LocalSocket::adopt_fd(request_server_socket));
|
auto socket = TRY(Core::LocalSocket::adopt_fd(request_server_socket));
|
||||||
TRY(socket->set_blocking(true));
|
TRY(socket->set_blocking(true));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue