REGRESSION (r141051): Broke plugin support on non-Mac WebKit2 Ports
[WebKit-https.git] / Source / WebKit2 / UIProcess / Launcher / gtk / ProcessLauncherGtk.cpp
index 1b08bd5..7c7f03a 100644 (file)
@@ -83,14 +83,23 @@ void ProcessLauncher::launchProcess()
         return;
     }
 
-    String executablePath = m_launchOptions.processType == WebProcess ?
-                            executablePathOfWebProcess() : executablePathOfPluginProcess();
-    CString binaryPath = fileSystemRepresentation(executablePath);
+    String executablePath, pluginPath;
+    CString realExecutablePath, realPluginPath;
+    if (m_launchOptions.processType == WebProcess)
+        executablePath = executablePathOfWebProcess();
+    else {
+        executablePath = executablePathOfPluginProcess();
+        pluginPath = m_launchOptions.extraInitializationData.get("plugin-path");
+        realPluginPath = fileSystemRepresentation(pluginPath);
+    }
+
+    realExecutablePath = fileSystemRepresentation(executablePath);
     GOwnPtr<gchar> socket(g_strdup_printf("%d", sockets[0]));
-    char* argv[3];
-    argv[0] = const_cast<char*>(binaryPath.data());
+    char* argv[4];
+    argv[0] = const_cast<char*>(realExecutablePath.data());
     argv[1] = socket.get();
-    argv[2] = 0;
+    argv[2] = const_cast<char*>(realPluginPath.data());
+    argv[3] = 0;
 
     GOwnPtr<GError> error;
     int spawnFlags = G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_DO_NOT_REAP_CHILD;