Title: [138574] trunk/Source/WebKit2
Revision
138574
Author
[email protected]
Date
2012-12-30 03:56:40 -0800 (Sun, 30 Dec 2012)

Log Message

[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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (138573 => 138574)


--- trunk/Source/WebKit2/ChangeLog	2012-12-30 09:51:21 UTC (rev 138573)
+++ trunk/Source/WebKit2/ChangeLog	2012-12-30 11:56:40 UTC (rev 138574)
@@ -1,3 +1,16 @@
+2012-12-30  Christophe Dumez  <[email protected]>
+
+        [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  <[email protected]>
 
         Windows build fix.

Modified: trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp (138573 => 138574)


--- trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp	2012-12-30 09:51:21 UTC (rev 138573)
+++ trunk/Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp	2012-12-30 11:56:40 UTC (rev 138574)
@@ -61,11 +61,9 @@
     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 @@
     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
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to