[EFL][WK2] Invalid use of temporary object in ProcessLauncher::launchProcess()

https://bugs.webkit.org/show_bug.cgi?id=105867

Reviewed by Kenneth Rohde Christiansen.

Fix invalid use of temporary object in ProcessLauncher::launchProcess()
for prefixedExecutablePath.

* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 155202c9
2012-12-30 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2] Invalid use of temporary object in ProcessLauncher::launchProcess()
https://bugs.webkit.org/show_bug.cgi?id=105867
Reviewed by Kenneth Rohde Christiansen.
Fix invalid use of temporary object in ProcessLauncher::launchProcess()
for prefixedExecutablePath.
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
2012-12-29 Sam Weinig <sam@webkit.org>
Windows build fix.
......@@ -61,11 +61,9 @@ void ProcessLauncher::launchProcess()
snprintf(socket, sizeof(socket), "%d", sockets[0]);
#ifndef NDEBUG
const char* prefixedExecutablePath = 0;
String prefixedExecutablePathStr;
String prefixedExecutablePath;
if (!m_launchOptions.processCmdPrefix.isEmpty()) {
prefixedExecutablePathStr = m_launchOptions.processCmdPrefix + ' ' + executablePath.data() + ' ' + socket;
prefixedExecutablePath = prefixedExecutablePathStr.utf8().data();
prefixedExecutablePath = m_launchOptions.processCmdPrefix + ' ' + String::fromUTF8(executablePath.data()) + ' ' + socket;
}
#endif
......@@ -76,11 +74,11 @@ void ProcessLauncher::launchProcess()
if (!pid) { // Child process.
close(sockets[1]);
#ifndef NDEBUG
if (prefixedExecutablePath) {
if (!prefixedExecutablePath.isNull()) {
// FIXME: This is not correct because it invokes the shell
// and keeps this process waiting. Should be changed to
// something like execvp().
if (system(prefixedExecutablePath) == -1) {
if (system(prefixedExecutablePath.utf8().data()) == -1) {
ASSERT_NOT_REACHED();
exit(EXIT_FAILURE);
} else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment