Skip to content
Permalink
Browse files
[GTK][EFL] Make *_PROCESS_CMD_PREFIX conditional on DEVELOPER_MODE
https://bugs.webkit.org/show_bug.cgi?id=161621

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2016-09-06
Reviewed by Carlos Garcia Campos.

Instead of enabling support for the *_PROCESS_CMD_PREFIX set of
environment valiables (eg. WEB_PROCESS_CMD_PREFIX) on debug builds
only, enable it when DEVELOPER_MODE is enabled as it already guards
similar features (eg. WEBKIT_EXEC_PATH).

* UIProcess/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):

Canonical link: https://commits.webkit.org/179790@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
em- authored and webkit-commit-queue committed Sep 6, 2016
1 parent 56e188f commit 31e7d2e1f29777601f16b4cd210aaa922492818e
@@ -1,3 +1,23 @@
2016-09-06 Emanuele Aina <emanuele.aina@collabora.com>

[GTK][EFL] Make *_PROCESS_CMD_PREFIX conditional on DEVELOPER_MODE
https://bugs.webkit.org/show_bug.cgi?id=161621

Reviewed by Carlos Garcia Campos.

Instead of enabling support for the *_PROCESS_CMD_PREFIX set of
environment valiables (eg. WEB_PROCESS_CMD_PREFIX) on debug builds
only, enable it when DEVELOPER_MODE is enabled as it already guards
similar features (eg. WEBKIT_EXEC_PATH).

* UIProcess/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):

2016-09-05 Zan Dobersek <zdobersek@igalia.com>

Fix ENABLE(GAMEPAD) build errors on non-Cocoa platforms
@@ -51,7 +51,7 @@ void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchO
if (const char* userDirectorySuffix = getenv("DIRHELPER_USER_DIR_SUFFIX"))
launchOptions.extraInitializationData.add(ASCIILiteral("user-directory-suffix"), userDirectorySuffix);

#if !defined(NDEBUG) && (PLATFORM(GTK) || PLATFORM(EFL))
#if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(EFL))
const char* varname;
switch (launchOptions.processType) {
case ProcessLauncher::ProcessType::Web:
@@ -60,7 +60,7 @@ class ProcessLauncher : public ThreadSafeRefCounted<ProcessLauncher> {
ProcessType processType;
HashMap<String, String> extraInitializationData;

#if (PLATFORM(EFL) || PLATFORM(GTK)) && !defined(NDEBUG)
#if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(EFL))
String processCmdPrefix;
#endif
};
@@ -128,7 +128,7 @@ void ProcessLauncher::launchProcess()
return;
}

#ifndef NDEBUG
#if ENABLE(DEVELOPER_MODE)
if (!m_launchOptions.processCmdPrefix.isEmpty())
processCmdPrefix = m_launchOptions.processCmdPrefix;
#endif
@@ -96,7 +96,7 @@ void ProcessLauncher::launchProcess()

unsigned nargs = 4; // size of the argv array for g_spawn_async()

#ifndef NDEBUG
#if ENABLE(DEVELOPER_MODE)
Vector<CString> prefixArgs;
if (!m_launchOptions.processCmdPrefix.isNull()) {
Vector<String> splitArgs;
@@ -109,7 +109,7 @@ void ProcessLauncher::launchProcess()

char** argv = g_newa(char*, nargs);
unsigned i = 0;
#ifndef NDEBUG
#if ENABLE(DEVELOPER_MODE)
// If there's a prefix command, put it before the rest of the args.
for (auto it = prefixArgs.begin(); it != prefixArgs.end(); it++)
argv[i++] = const_cast<char*>(it->data());

0 comments on commit 31e7d2e

Please sign in to comment.