Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 88ebf35179bfe9915ae11245e2030f5f5fe9c6c5
      
https://github.com/WebKit/WebKit/commit/88ebf35179bfe9915ae11245e2030f5f5fe9c6c5
  Author: Claudio Saavedra <[email protected]>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M Source/WTF/wtf/glib/Sandbox.cpp
    M Source/WTF/wtf/glib/Sandbox.h
    M Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
    M Source/WebKit/UIProcess/Launcher/ProcessLauncher.h
    M Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
    M Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.h
    M Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp
    M Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
    M Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp
    M Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.h
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp

  Log Message:
  -----------
  [GLib] Use UTF8CString for the argument lists built by the process launchers
https://bugs.webkit.org/show_bug.cgi?id=324560

Reviewed by Chris Dumez.

The bubblewrap, flatpak and xdg-dbus-proxy launchers assemble their argv as
Vector<CString> from literals, GLib paths and String::utf8() results, and the
sandbox path map that feeds them is keyed by CString. Those bytes are UTF-8 by
the same convention FileSystem::fileSystemRepresentation() already encodes in
its UTF8CString return type, so declare them as such: literals become
ASCIILiteral, GLib strings are wrapped where they enter, and the map, the
XDGDBusProxy paths, injectedBundleDirectory() and
sandboxedUserRuntimeDirectory() carry the type through to the exec boundary.

Arguments that were composed with g_strdup_printf() from values we already hold
as String or int are now composed with makeString() or String::number(), whose
utf8() is the typed string directly.

argumentsToFileDescriptor() only needs the bytes of each argument and its NUL
terminator, so it now appends spanIncludingNullTerminator() to a Vector and
hands the span to createSealedMemFdWithData(), instead of going through GString
and GBytes and back to a pointer.

* Source/WTF/wtf/glib/Sandbox.cpp:
(WTF::sandboxedUserRuntimeDirectory):
* Source/WTF/wtf/glib/Sandbox.h:
* Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:
(injectedBundleDirectory):
(webkitWebContextConstructed):
* Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:
* Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::createSealedMemFdWithData):
(WebKit::argumentsToFileDescriptor):
(WebKit::createBwrapInfo):
(WebKit::createFlatpakInfo):
(WebKit::bindSymlinksRealPath):
(WebKit::bindIfExists):
(WebKit::bindDBusSession):
(WebKit::bindX11):
(WebKit::bindWayland):
(WebKit::bindPulse):
(WebKit::bindSndio):
(WebKit::bindFonts):
(WebKit::bindGtkData):
(WebKit::bindA11y):
(WebKit::bindPathVar):
(WebKit::bindGStreamerData):
(WebKit::bindOpenGL):
(WebKit::bindV4l):
(WebKit::directoryContainingDBusSocket):
(WebKit::addExtraPaths):
(WebKit::bubblewrapSpawn):
* Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.h:
* Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp:
(WebKit::flatpakSpawn):
* Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
(WebKit::ProcessLauncher::launchProcess):
* Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp:
(WebKit::XDGDBusProxy::makeProxy):
(WebKit::XDGDBusProxy::dbusSessionProxy):
(WebKit::XDGDBusProxy::accessibilityProxy):
(WebKit::XDGDBusProxy::launch):
* Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.h:
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::setSandboxEnabled):

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



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

Reply via email to