mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-22 02:49:29 +03:00
124c378472
We now create a WorkerAgent for the parent context, which is currently only a Window. Note that Workers can have Workers per the spec. The WorkerAgent spawns a WebWorker process to hold the actual script execution of the Worker. This is modeled with the DedicatedWorkerHost object in the WebWorker process. A start_dedicated_worker IPC method in the WebWorker IPC creates the WorkerHost object. Future different worker types may use different IPC messages to create their WorkerHost instance. This implementation cannot yet postMessage between the parent and the child processes. Co-Authored-By: Andreas Kling <kling@serenityos.org>
25 lines
857 B
CMake
25 lines
857 B
CMake
set(WEBWORKER_SOURCE_DIR ${SERENITY_SOURCE_DIR}/Userland/Services/WebWorker)
|
|
|
|
set(CMAKE_AUTOMOC OFF)
|
|
set(CMAKE_AUTORCC OFF)
|
|
set(CMAKE_AUTOUIC OFF)
|
|
|
|
set(WEBWORKER_SOURCES
|
|
"${WEBWORKER_SOURCE_DIR}/ConnectionFromClient.cpp"
|
|
"${WEBWORKER_SOURCE_DIR}/DedicatedWorkerHost.cpp"
|
|
"${WEBWORKER_SOURCE_DIR}/PageHost.cpp"
|
|
../HelperProcess.cpp
|
|
../Utilities.cpp
|
|
)
|
|
|
|
# FIXME: Add Android service
|
|
|
|
add_library(webworker STATIC ${WEBWORKER_SOURCES})
|
|
|
|
target_include_directories(webworker PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
|
|
target_include_directories(webworker PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
|
|
target_link_libraries(webworker PUBLIC LibCore LibFileSystem LibGfx LibIPC LibJS LibProtocol LibWeb LibWebView LibLocale LibImageDecoderClient LibMain)
|
|
|
|
add_executable(WebWorker main.cpp)
|
|
target_link_libraries(WebWorker PRIVATE webworker)
|