Title: [229148] trunk/Source/WebKit
Revision
229148
Author
[email protected]
Date
2018-03-01 15:11:46 -0800 (Thu, 01 Mar 2018)

Log Message

Fix some errors due to some mach port APIs being unavailable on watchOS
https://bugs.webkit.org/show_bug.cgi?id=183262
<rdar://problem/38028521>

Reviewed by Tim Horton.

Minor build fix; mach_port_guard and mach_port_unguard are not available on this platform.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (229147 => 229148)


--- trunk/Source/WebKit/ChangeLog	2018-03-01 22:35:38 UTC (rev 229147)
+++ trunk/Source/WebKit/ChangeLog	2018-03-01 23:11:46 UTC (rev 229148)
@@ -1,3 +1,18 @@
+2018-03-01  Wenson Hsieh  <[email protected]>
+
+        Fix some errors due to some mach port APIs being unavailable on watchOS
+        https://bugs.webkit.org/show_bug.cgi?id=183262
+        <rdar://problem/38028521>
+
+        Reviewed by Tim Horton.
+
+        Minor build fix; mach_port_guard and mach_port_unguard are not available on this platform.
+
+        * Platform/IPC/mac/ConnectionMac.mm:
+        (IPC::Connection::platformInvalidate):
+        (IPC::Connection::platformInitialize):
+        (IPC::Connection::open):
+
 2018-03-01  Per Arne Vollan  <[email protected]>
 
         Unreviewed build fix after r229140.

Modified: trunk/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm (229147 => 229148)


--- trunk/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm	2018-03-01 22:35:38 UTC (rev 229147)
+++ trunk/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm	2018-03-01 23:11:46 UTC (rev 229148)
@@ -120,7 +120,9 @@
         }
 
         if (m_receivePort) {
+#if !PLATFORM(WATCHOS)
             mach_port_unguard(mach_task_self(), m_receivePort, reinterpret_cast<mach_port_context_t>(this));
+#endif
             mach_port_mod_refs(mach_task_self(), m_receivePort, MACH_PORT_RIGHT_RECEIVE, -1);
             m_receivePort = MACH_PORT_NULL;
         }
@@ -158,7 +160,9 @@
         m_receivePort = identifier.port;
         m_sendPort = MACH_PORT_NULL;
 
+#if !PLATFORM(WATCHOS)
         mach_port_guard(mach_task_self(), m_receivePort, reinterpret_cast<mach_port_context_t>(this), true);
+#endif
     } else {
         m_receivePort = MACH_PORT_NULL;
         m_sendPort = identifier.port;
@@ -181,7 +185,9 @@
         ASSERT(m_sendPort);
 
         mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &m_receivePort);
+#if !PLATFORM(WATCHOS)
         mach_port_guard(mach_task_self(), m_receivePort, reinterpret_cast<mach_port_context_t>(this), true);
+#endif
 
 #if PLATFORM(MAC)
         mach_port_set_attributes(mach_task_self(), m_receivePort, MACH_PORT_DENAP_RECEIVER, (mach_port_info_t)0, 0);
@@ -207,7 +213,11 @@
         connection->receiveSourceEventHandler();
     });
     dispatch_source_set_cancel_handler(m_receiveSource, [connection, receivePort = m_receivePort] {
+#if PLATFORM(WATCHOS)
+        UNUSED_PARAM(connection);
+#else
         mach_port_unguard(mach_task_self(), receivePort, reinterpret_cast<mach_port_context_t>(connection.get()));
+#endif
         mach_port_mod_refs(mach_task_self(), receivePort, MACH_PORT_RIGHT_RECEIVE, -1);
     });
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to