diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp index 31f0de425..a25b18310 100644 --- a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp +++ b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp @@ -31,11 +31,9 @@ namespace WebKit { -static WorkQueue& processLauncherWorkQueue() +static WorkQueue* processLauncherWorkQueue() { - // Give in to VisualStudio and its 31 character thread name limit and shorten the thread name to ProcLauncher instead of class name. - // See createThread() in Threading.cpp. - DEFINE_STATIC_LOCAL(WorkQueue, processLauncherWorkQueue, ("com.apple.WebKit.ProcLauncher")); + static WorkQueue* processLauncherWorkQueue = WorkQueue::create("com.apple.WebKit.ProcessLauncher").leakRef(); return processLauncherWorkQueue; } @@ -46,7 +44,7 @@ ProcessLauncher::ProcessLauncher(Client* client, const LaunchOptions& launchOpti { // Launch the process. m_isLaunching = true; - processLauncherWorkQueue().dispatch(bind(&ProcessLauncher::launchProcess, this)); + processLauncherWorkQueue()->dispatch(bind(&ProcessLauncher::launchProcess, this)); } void ProcessLauncher::didFinishLaunchingProcess(PlatformProcessIdentifier processIdentifier, CoreIPC::Connection::Identifier identifier) @@ -55,7 +53,18 @@ void ProcessLauncher::didFinishLaunchingProcess(PlatformProcessIdentifier proces m_isLaunching = false; if (!m_client) { - // FIXME: Dispose of the connection identifier. + // FIXME: Make Identifier a move-only object and release port rights/connections in the destructor. +#if PLATFORM(MAC) + if (identifier.port) + mach_port_mod_refs(mach_task_self(), identifier.port, MACH_PORT_RIGHT_RECEIVE, -1); + +#if HAVE(XPC) + if (identifier.xpcConnection) { + xpc_release(identifier.xpcConnection); + identifier.xpcConnection = 0; + } +#endif +#endif return; } |