Ladybird: Use MachPortServer to get WebContent Mach ports on macOS

This commit is contained in:
Andrew Kaster
2024-04-04 14:13:14 -06:00
committed by Andrew Kaster
parent 8c5e64e686
commit 3b5ac433ef
7 changed files with 58 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
*/
#include "HelperProcess.h"
#include "Utilities.h"
#include <LibCore/Environment.h>
#include <LibWebView/ProcessManager.h>
@@ -64,6 +65,10 @@ ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(
arguments.append("--use-gpu-painting"sv);
if (web_content_options.wait_for_debugger == Ladybird::WaitForDebugger::Yes)
arguments.append("--wait-for-debugger"sv);
if (auto server = mach_server_name(); server.has_value()) {
arguments.append("--mach-server-name"sv);
arguments.append(server.value());
}
Vector<ByteString> certificate_args;
for (auto const& certificate : web_content_options.certificates) {
certificate_args.append(ByteString::formatted("--certificate={}", certificate));