summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2017-06-01 15:54:01 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-06-02 14:07:43 +0000
commit0a3506ebe5d7f431f0dd4dffa24ac32063b90ff1 (patch)
treef3d0b92fe7bc5b31426a838c354616fff335e82b /Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm
parent881da28418d380042aa95a97f0cbd42560a64f7c (diff)
downloadqtwebkit-0a3506ebe5d7f431f0dd4dffa24ac32063b90ff1.tar.gz
Import WebKit commit 3ca7a25a550e473d60bbbe321475c6c0ef114b31
Change-Id: I480668a0cb8114dccf7a1195190a993282875759 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm')
-rw-r--r--Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm b/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm
index b7ac61a9d..a12e25431 100644
--- a/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm
+++ b/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm
@@ -111,8 +111,19 @@ private:
void Connection::platformInvalidate()
{
- if (!m_isConnected)
+ if (!m_isConnected) {
+ if (m_sendPort) {
+ mach_port_deallocate(mach_task_self(), m_sendPort);
+ m_sendPort = MACH_PORT_NULL;
+ }
+
+ if (m_receivePort) {
+ mach_port_mod_refs(mach_task_self(), m_receivePort, MACH_PORT_RIGHT_RECEIVE, -1);
+ m_receivePort = MACH_PORT_NULL;
+ }
+
return;
+ }
m_isConnected = false;
@@ -138,8 +149,6 @@ void Connection::platformInvalidate()
m_exceptionPort = MACH_PORT_NULL;
}
#endif
-
- m_xpcConnection = nullptr;
}
void Connection::terminateSoon(double intervalInSeconds)