Title: [210596] trunk/Source/WebKit2
Revision
210596
Author
ander...@apple.com
Date
2017-01-11 13:28:01 -0800 (Wed, 11 Jan 2017)

Log Message

REGRESSION: Crash in com.apple.WebKit: IPC::Connection::sendMessage(std::__1::unique_ptr<IPC::MachMessage, std::__1::default_delete<IPC::MachMessage> >) + 27
https://bugs.webkit.org/show_bug.cgi?id=165854
rdar://problem/29757269

Reviewed by Tim Horton.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendMessage):
Add assertion.

(IPC::Connection::initializeSendSource):
Turns out the event handler can be called spuriously, so guard against that.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (210595 => 210596)


--- trunk/Source/WebKit2/ChangeLog	2017-01-11 21:07:13 UTC (rev 210595)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-11 21:28:01 UTC (rev 210596)
@@ -1,3 +1,18 @@
+2017-01-11  Anders Carlsson  <ander...@apple.com>
+
+        REGRESSION: Crash in com.apple.WebKit: IPC::Connection::sendMessage(std::__1::unique_ptr<IPC::MachMessage, std::__1::default_delete<IPC::MachMessage> >) + 27
+        https://bugs.webkit.org/show_bug.cgi?id=165854
+        rdar://problem/29757269
+
+        Reviewed by Tim Horton.
+
+        * Platform/IPC/mac/ConnectionMac.mm:
+        (IPC::Connection::sendMessage):
+        Add assertion.
+
+        (IPC::Connection::initializeSendSource):
+        Turns out the event handler can be called spuriously, so guard against that.
+
 2017-01-11  Chris Dumez  <cdu...@apple.com>
 
         [iOS][WK2] KeyboardEvent.key always returns an empty string

Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm (210595 => 210596)


--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm	2017-01-11 21:07:13 UTC (rev 210595)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm	2017-01-11 21:28:01 UTC (rev 210596)
@@ -263,6 +263,7 @@
 
 bool Connection::sendMessage(std::unique_ptr<MachMessage> message)
 {
+    ASSERT(message);
     ASSERT(!m_pendingOutgoingMachMessage);
 
     // Send the message.
@@ -399,7 +400,9 @@
         }
 
         if (data & DISPATCH_MACH_SEND_POSSIBLE) {
-            connection->sendMessage(WTFMove(connection->m_pendingOutgoingMachMessage));
+            // FIXME: Figure out why we get spurious DISPATCH_MACH_SEND_POSSIBLE events.
+            if (connection->m_pendingOutgoingMachMessage)
+                connection->sendMessage(WTFMove(connection->m_pendingOutgoingMachMessage));
             connection->sendOutgoingMessages();
             return;
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to