logo

WebKitGTK

Unnamed repository; edit this file 'description' to name the repository.
commit: 6519d681c921aa98e83a2d94f584d46c09830dba
parent: c0550ccb0bde3fd70277b74ad696539f9d1dc0a0
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 29 Jul 2019 16:41:43 +0200

ProcessLauncher::launchProcess: Do not g_error() on me

Diffstat:

MSource/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp @@ -34,6 +34,7 @@ #include <errno.h> #include <fcntl.h> #include <glib.h> +#include <glib/gprintf.h> #include <wtf/FileSystem.h> #include <wtf/RunLoop.h> #include <wtf/UniStdExtras.h> @@ -202,8 +203,11 @@ void ProcessLauncher::launchProcess() #endif // OS(LINUX) process = adoptGRef(g_subprocess_launcher_spawnv(launcher.get(), argv, &error.outPtr())); - if (!process.get()) - g_error("Unable to fork a new child process: %s", error->message); + if (!process.get()) { + g_fprintf(stderr, "WebKit: Unable to fork a new child process: %s", error->message); + //TODO: try to clean before returning + return; + } const char* processIdStr = g_subprocess_get_identifier(process.get()); m_processIdentifier = g_ascii_strtoll(processIdStr, nullptr, 0);