Changeset 146915 in webkit


Ignore:
Timestamp:
Mar 26, 2013, 12:01:17 PM (12 years ago)
Author:
abecsi@webkit.org
Message:

[Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces
https://bugs.webkit.org/show_bug.cgi?id=113328

Reviewed by Jocelyn Turcotte.

Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249

We use QProcess::start() with a commandline string to start the web process
and the string is treated by QProcess as a whitespace delimeted list of the
command and the arguments, thus we have to escape the path to the process
binaries so that if the path contains spaces we still run the appropriate
command.

  • UIProcess/Launcher/qt/ProcessLauncherQt.cpp:

(WebKit::ProcessLauncher::launchProcess):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r146914 r146915  
     12013-03-26  Andras Becsi  <andras.becsi@digia.com>
     2
     3        [Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces
     4        https://bugs.webkit.org/show_bug.cgi?id=113328
     5
     6        Reviewed by Jocelyn Turcotte.
     7
     8        Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249
     9
     10        We use QProcess::start() with a commandline string to start the web process
     11        and the string is treated by QProcess as a whitespace delimeted list of the
     12        command and the arguments, thus we have to escape the path to the process
     13        binaries so that if the path contains spaces we still run the appropriate
     14        command.
     15
     16        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
     17        (WebKit::ProcessLauncher::launchProcess):
     18
    1192013-03-26  Andras Becsi  <andras.becsi@digia.com>
    220
  • trunk/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp

    r141275 r146915  
    115115    QString commandLine;
    116116    if (m_launchOptions.processType == WebProcess) {
    117         commandLine = QLatin1String("%1 %2 %3");
     117        commandLine = QLatin1String("%1 \"%2\" %3");
    118118        QByteArray webProcessPrefix = qgetenv("QT_WEBKIT2_WP_CMD_PREFIX");
    119119        commandLine = commandLine.arg(QLatin1String(webProcessPrefix.constData())).arg(QString(executablePathOfWebProcess()));
    120120#if ENABLE(PLUGIN_PROCESS)
    121121    } else if (m_launchOptions.processType == PluginProcess) {
    122         commandLine = QLatin1String("%1 %2 %3 %4");
     122        commandLine = QLatin1String("%1 \"%2\" %3 %4");
    123123        QByteArray pluginProcessPrefix = qgetenv("QT_WEBKIT2_PP_CMD_PREFIX");
    124124        commandLine = commandLine.arg(QLatin1String(pluginProcessPrefix.constData())).arg(QString(executablePathOfPluginProcess()));
     
    183183#if ENABLE(SUID_SANDBOX_LINUX)
    184184    if (m_launchOptions.processType == WebProcess) {
    185         QString sandboxCommandLine = QLatin1String("%1 %2 %3");
     185        QString sandboxCommandLine = QLatin1String("\"%1\" \"%2\" %3");
    186186        sandboxCommandLine = sandboxCommandLine.arg(QCoreApplication::applicationDirPath() + QLatin1String("/SUIDSandboxHelper"));
    187187        sandboxCommandLine = sandboxCommandLine.arg(executablePathOfWebProcess());
Note: See TracChangeset for help on using the changeset viewer.