Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 028fba0979e9b3911d607034c7e2f43814c5553d
      
https://github.com/WebKit/WebKit/commit/028fba0979e9b3911d607034c7e2f43814c5553d
  Author: Alejandro G. Castro <[email protected]>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
    M Source/WebKit/WPEPlatform/CMakeLists.txt
    M Source/WebKit/WPEPlatform/wpe/WPEConfig.h.in
    A Source/WebKit/WPEPlatform/wpe/WPEProcessManager.cpp
    A Source/WebKit/WPEPlatform/wpe/WPEProcessManager.h
    M Source/WebKit/WPEPlatform/wpe/wpe-platform.h
    M Source/cmake/OptionsWPE.cmake

  Log Message:
  -----------
  [WPE] WPEPlatform add WPEProcessManager to allow embedder launch the 
auxiliary processes
https://bugs.webkit.org/show_bug.cgi?id=317845

Reviewed by Carlos Garcia Campos and Adrian Perez de Castro.

WebKit's auxiliary processes (Web, Network and GPU) are launched by
ProcessLauncherGLib via g_subprocess_launcher_spawnv(). That does not work on
platforms where the auxiliary processes cannot be spawned as executables and
must be created by the embedder instead, for example Android, where each process
is a service started with bindService(). With the legacy libwpe API this was
handled by libwpe's process provider, but a WPEPlatform-only build
(ENABLE_WPE_LEGACY_API=OFF) had no equivalent and could only fall back to
spawning executables.

Add a WPEProcessManager abstract class for Android that we subclass to launch 
and
terminate auxiliary processes, and register it process-wide with
wpe_process_manager_set_default(). This is currently only needed on Android, so
the WPEProcessManager type is built and exposed only on Android if
WPE_PLATFORM_PROCESS_MANAGER_ANDROID config is defined, and
the ProcessLauncherGLib integration is guarded with OS(ANDROID); other ports
keep the existing subprocess launching and are unaffected. ProcessLauncherGLib
uses the default manager through wpe_process_manager_get_default() when one is
set. The process manager is a system-level facility that does not change at
runtime, so it is a global default rather than a per-WPEDisplay object.

* Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Use the default
  WPEProcessManager when set on Android.
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::terminateProcess):
* Source/WebKit/WPEPlatform/CMakeLists.txt: Build the new files on Android.
* Source/cmake/OptionsWPE.cmake: Set WPE_PLATFORM_PROCESS_MANAGER_ANDROID on 
Android.
* Source/WebKit/WPEPlatform/wpe/WPEConfig.h.in: Add 
WPE_PLATFORM_PROCESS_MANAGER_ANDROID.
* Source/WebKit/WPEPlatform/wpe/WPEProcessManager.cpp: Added.
(wpe_process_launch_options_copy):
(wpe_process_launch_options_free):
(wpe_process_launch_options_new):
(wpe_process_launch_options_get_process_type):
(wpe_process_launch_options_get_process_id):
(wpe_process_launch_options_get_ipc_socket_fd):
(wpe_process_manager_class_init):
(wpe_process_manager_launch):
(wpe_process_manager_terminate):
(wpe_process_manager_get_default):
(wpe_process_manager_set_default):
* Source/WebKit/WPEPlatform/wpe/WPEProcessManager.h: Added.
* Source/WebKit/WPEPlatform/wpe/wpe-platform.h: Include WPEProcessManager.h on 
Android.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to