Modified: trunk/Source/WebKit2/ChangeLog (211647 => 211648)
--- trunk/Source/WebKit2/ChangeLog 2017-02-03 21:17:28 UTC (rev 211647)
+++ trunk/Source/WebKit2/ChangeLog 2017-02-03 21:48:23 UTC (rev 211648)
@@ -1,5 +1,15 @@
2017-02-03 Anders Carlsson <[email protected]>
+ Stash away the ports - they will be nulled out before the cancel handlers are called
+ https://bugs.webkit.org/show_bug.cgi?id=167812
+
+ Reviewed by Geoffrey Garen.
+
+ * Platform/IPC/mac/ConnectionMac.mm:
+ (IPC::Connection::open):
+
+2017-02-03 Anders Carlsson <[email protected]>
+
Inline createReceiveSource in its two call sites
https://bugs.webkit.org/show_bug.cgi?id=167809
Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm (211647 => 211648)
--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm 2017-02-03 21:17:28 UTC (rev 211647)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm 2017-02-03 21:48:23 UTC (rev 211648)
@@ -217,8 +217,8 @@
dispatch_source_set_event_handler(m_receiveSource, [connection] {
connection->receiveSourceEventHandler();
});
- dispatch_source_set_cancel_handler(m_receiveSource, [connection] {
- mach_port_mod_refs(mach_task_self(), connection->m_receivePort, MACH_PORT_RIGHT_RECEIVE, -1);
+ dispatch_source_set_cancel_handler(m_receiveSource, [connection, receivePort = m_receivePort] {
+ mach_port_mod_refs(mach_task_self(), receivePort, MACH_PORT_RIGHT_RECEIVE, -1);
});
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 101000
@@ -227,8 +227,8 @@
dispatch_source_set_event_handler(m_exceptionPortDataAvailableSource, [connection] {
connection->exceptionSourceEventHandler();
});
- dispatch_source_set_cancel_handler(m_exceptionPortDataAvailableSource, [connection] {
- mach_port_mod_refs(mach_task_self(), connection->m_exceptionPort, MACH_PORT_RIGHT_RECEIVE, -1);
+ dispatch_source_set_cancel_handler(m_exceptionPortDataAvailableSource, [connection, exceptionPort = m_exceptionPort] {
+ mach_port_mod_refs(mach_task_self(), exceptionPort, MACH_PORT_RIGHT_RECEIVE, -1);
});
auto encoder = std::make_unique<Encoder>("IPC", "SetExceptionPort", 0);