summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/UIProcess/Launcher
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 19:08:45 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:51:31 +0100
commit2bde8e466a4451c7319e3a072d118917957d6554 (patch)
tree28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebKit2/UIProcess/Launcher
parent6939c99b71d9372d14a0c74a772108052e8c48c8 (diff)
downloadexternal_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebKit2/UIProcess/Launcher')
-rw-r--r--Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h2
-rw-r--r--Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h2
-rw-r--r--Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm13
-rw-r--r--Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp12
4 files changed, 19 insertions, 10 deletions
diff --git a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
index 8a1cd01..8dbfb11 100644
--- a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
+++ b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
@@ -37,7 +37,7 @@ class QLocalSocket;
namespace WebKit {
-class ProcessLauncher : public ThreadSafeShared<ProcessLauncher> {
+class ProcessLauncher : public ThreadSafeRefCounted<ProcessLauncher> {
public:
class Client {
public:
diff --git a/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h b/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h
index 9c90fbd..f3a5312 100644
--- a/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h
+++ b/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h
@@ -37,7 +37,7 @@ class QLocalSocket;
namespace WebKit {
-class ThreadLauncher : public ThreadSafeShared<ThreadLauncher> {
+class ThreadLauncher : public ThreadSafeRefCounted<ThreadLauncher> {
public:
class Client {
public:
diff --git a/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm b/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
index af758d9..a1e8f5c 100644
--- a/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
+++ b/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
@@ -200,8 +200,13 @@ void ProcessLauncher::launchProcess()
NSString *frameworksPath = [[webKit2Bundle bundlePath] stringByDeletingLastPathComponent];
const char* frameworkExecutablePath = [[webKit2Bundle executablePath] fileSystemRepresentation];
- NSString *webProcessAppPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"];
- NSString *webProcessAppExecutablePath = [[NSBundle bundleWithPath:webProcessAppPath] executablePath];
+ NSString *processPath;
+ if (m_launchOptions.processType == ProcessLauncher::PluginProcess)
+ processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"PluginProcess.app"];
+ else
+ processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"];
+
+ NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
RetainPtr<CFStringRef> cfLocalization(AdoptCF, WKCopyCFLocalizationPreferredName(NULL));
CString localization = String(cfLocalization.get()).utf8();
@@ -209,7 +214,7 @@ void ProcessLauncher::launchProcess()
// Make a unique, per pid, per process launcher web process service name.
CString serviceName = String::format("com.apple.WebKit.WebProcess-%d-%p", getpid(), this).utf8();
- const char* args[] = { [webProcessAppExecutablePath fileSystemRepresentation], frameworkExecutablePath, "-type", processTypeAsString(m_launchOptions.processType), "-servicename", serviceName.data(), "-localization", localization.data(), 0 };
+ const char* args[] = { [processAppExecutablePath fileSystemRepresentation], frameworkExecutablePath, "-type", processTypeAsString(m_launchOptions.processType), "-servicename", serviceName.data(), "-localization", localization.data(), 0 };
// Register ourselves.
kern_return_t kr = bootstrap_register2(bootstrap_port, const_cast<char*>(serviceName.data()), listeningPort, 0);
@@ -259,7 +264,7 @@ void ProcessLauncher::launchProcess()
if (m_launchOptions.processType == ProcessLauncher::PluginProcess) {
// We need to insert the plug-in process shim.
- NSString *pluginProcessShimPathNSString = [[webProcessAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"PluginProcessShim.dylib"];
+ NSString *pluginProcessShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"PluginProcessShim.dylib"];
const char* pluginProcessShimPath = [pluginProcessShimPathNSString fileSystemRepresentation];
// Make sure that the file exists.
diff --git a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
index 1e7e14a..cae5bdf 100644
--- a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
+++ b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
@@ -75,18 +75,22 @@ protected:
void QtWebProcess::setupChildProcess()
{
#if defined Q_OS_LINUX
+#ifndef NDEBUG
+ if (getenv("QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS"))
+ return;
+#endif
prctl(PR_SET_PDEATHSIG, SIGKILL);
#endif
}
void ProcessLauncher::launchProcess()
{
- QString applicationPath = "%1 %2";
+ QString applicationPath = QLatin1String("%1 %2");
- if (QFile::exists(QCoreApplication::applicationDirPath() + "/QtWebProcess")) {
- applicationPath = applicationPath.arg(QCoreApplication::applicationDirPath() + "/QtWebProcess");
+ if (QFile::exists(QCoreApplication::applicationDirPath() + QLatin1String("/QtWebProcess"))) {
+ applicationPath = applicationPath.arg(QCoreApplication::applicationDirPath() + QLatin1String("/QtWebProcess"));
} else {
- applicationPath = applicationPath.arg("QtWebProcess");
+ applicationPath = applicationPath.arg(QLatin1String("QtWebProcess"));
}
int sockets[2];