diff options
Diffstat (limited to 'Source/WebKit2/UIProcess/Launcher')
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]; |