Modified: trunk/Source/WebKit2/ChangeLog (164904 => 164905)
--- trunk/Source/WebKit2/ChangeLog 2014-03-01 04:01:06 UTC (rev 164904)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-01 04:10:24 UTC (rev 164905)
@@ -1,3 +1,21 @@
+2014-02-28 Pratik Solanki <psola...@apple.com>
+
+ [iOS][WebKit2] Don't use any of the mach exception handling code on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=129516
+
+ Reviewed by Sam Weinig.
+
+ This code is not used on iOS after my fix in r164883. We can just move it all under
+ !PLATFORM(IOS).
+
+ * Platform/IPC/Connection.h:
+ * Platform/IPC/mac/ConnectionMac.cpp:
+ (IPC::Connection::platformInvalidate):
+ (IPC::Connection::platformInitialize):
+ (IPC::Connection::open):
+ * Shared/ChildProcessProxy.cpp:
+ (WebKit::ChildProcessProxy::didFinishLaunching):
+
2014-02-28 Benjamin Poulain <bpoul...@apple.com>
[iOS][WK2] highlight rects should never big bigger than the view
Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (164904 => 164905)
--- trunk/Source/WebKit2/Platform/IPC/Connection.h 2014-03-01 04:01:06 UTC (rev 164904)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h 2014-03-01 04:10:24 UTC (rev 164905)
@@ -133,7 +133,7 @@
Client* client() const { return m_client; }
-#if OS(DARWIN)
+#if !PLATFORM(IOS)
void setShouldCloseConnectionOnMachExceptions();
#endif
@@ -283,7 +283,6 @@
// Called on the connection queue.
void receiveSourceEventHandler();
void initializeDeadNameSource();
- void exceptionSourceEventHandler();
mach_port_t m_sendPort;
dispatch_source_t m_deadNameSource;
@@ -291,10 +290,14 @@
mach_port_t m_receivePort;
dispatch_source_t m_receivePortDataAvailableSource;
+#if !PLATFORM(IOS)
+ void exceptionSourceEventHandler();
+
// If setShouldCloseConnectionOnMachExceptions has been called, this has
// the exception port that exceptions from the other end will be sent on.
mach_port_t m_exceptionPort;
dispatch_source_t m_exceptionPortDataAvailableSource;
+#endif
xpc_connection_t m_xpcConnection;
Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp (164904 => 164905)
--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp 2014-03-01 04:01:06 UTC (rev 164904)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp 2014-03-01 04:10:24 UTC (rev 164905)
@@ -65,12 +65,14 @@
m_receivePortDataAvailableSource = 0;
m_receivePort = MACH_PORT_NULL;
+#if !PLATFORM(IOS)
if (m_exceptionPort) {
dispatch_source_cancel(m_exceptionPortDataAvailableSource);
dispatch_release(m_exceptionPortDataAvailableSource);
m_exceptionPortDataAvailableSource = 0;
m_exceptionPort = MACH_PORT_NULL;
}
+#endif
if (m_xpcConnection) {
xpc_release(m_xpcConnection);
@@ -80,7 +82,10 @@
void Connection::platformInitialize(Identifier identifier)
{
+#if !PLATFORM(IOS)
m_exceptionPort = MACH_PORT_NULL;
+ m_exceptionPortDataAvailableSource = nullptr;
+#endif
if (m_isServer) {
m_receivePort = identifier.port;
@@ -92,7 +97,6 @@
m_deadNameSource = nullptr;
m_receivePortDataAvailableSource = nullptr;
- m_exceptionPortDataAvailableSource = nullptr;
m_xpcConnection = identifier.xpcConnection;
// FIXME: Instead of explicitly retaining the connection here, Identifier::xpcConnection
@@ -149,6 +153,7 @@
// Register the data available handler.
m_receivePortDataAvailableSource = createDataAvailableSource(m_receivePort, m_connectionQueue.get(), bind(&Connection::receiveSourceEventHandler, this));
+#if !PLATFORM(IOS)
// If we have an exception port, register the data available handler and send over the port to the other end.
if (m_exceptionPort) {
m_exceptionPortDataAvailableSource = createDataAvailableSource(m_exceptionPort, m_connectionQueue.get(), bind(&Connection::exceptionSourceEventHandler, this));
@@ -158,6 +163,7 @@
sendMessage(std::move(encoder));
}
+#endif
ref();
dispatch_async(m_connectionQueue->dispatchQueue(), ^{
@@ -165,8 +171,10 @@
if (m_deadNameSource)
dispatch_resume(m_deadNameSource);
+#if !PLATFORM(IOS)
if (m_exceptionPortDataAvailableSource)
dispatch_resume(m_exceptionPortDataAvailableSource);
+#endif
deref();
});
@@ -432,6 +440,7 @@
return;
}
+#if !PLATFORM(IOS)
if (decoder->messageReceiverName() == "IPC" && decoder->messageName() == "SetExceptionPort") {
if (m_isServer) {
// Server connections aren't supposed to have their exception ports overriden. Treat this as an invalid message.
@@ -445,10 +454,12 @@
setMachExceptionPort(exceptionPort.port());
return;
}
+#endif
processIncomingMessage(std::move(decoder));
}
+#if !PLATFORM(IOS)
void Connection::exceptionSourceEventHandler()
{
ReceiveBuffer buffer;
@@ -493,5 +504,6 @@
if (mach_port_insert_right(mach_task_self(), m_exceptionPort, m_exceptionPort, MACH_MSG_TYPE_MAKE_SEND) != KERN_SUCCESS)
ASSERT_NOT_REACHED();
}
+#endif
} // namespace IPC
Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp (164904 => 164905)
--- trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp 2014-03-01 04:01:06 UTC (rev 164904)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp 2014-03-01 04:10:24 UTC (rev 164905)
@@ -128,7 +128,7 @@
ASSERT(!m_connection);
m_connection = IPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main());
-#if PLATFORM(MAC)
+#if !PLATFORM(IOS)
m_connection->setShouldCloseConnectionOnMachExceptions();
#endif