<rdar://problem/13064414> REGRESSION(r139514): didFailToSendSyncMessage is...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2013 21:34:24 +0000 (21:34 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2013 21:34:24 +0000 (21:34 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=107715

        Reviewed by Anders Carlsson.

        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::sendSyncMessage):
        (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
        Correcting a misapplied edit - didFailToSendSyncMessage should be kept in main
        thread message sending, not in secondary thread.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Platform/CoreIPC/Connection.cpp

index 32343e8..56afd31 100644 (file)
@@ -1,3 +1,16 @@
+2013-01-23  Alexey Proskuryakov  <ap@apple.com>
+
+        <rdar://problem/13064414> REGRESSION(r139514): didFailToSendSyncMessage is not called by Connection
+        https://bugs.webkit.org/show_bug.cgi?id=107715
+
+        Reviewed by Anders Carlsson.
+
+        * Platform/CoreIPC/Connection.cpp:
+        (CoreIPC::Connection::sendSyncMessage):
+        (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
+        Correcting a misapplied edit - didFailToSendSyncMessage should be kept in main
+        thread message sending, not in secondary thread.
+
 2013-01-23  Brady Eidson  <beidson@apple.com>
 
         Recursion handling cancelled authentication challenges in NetworkProcess
index f9ae101..f5c5081 100644 (file)
@@ -404,8 +404,10 @@ PassOwnPtr<MessageDecoder> Connection::sendSyncMessage(MessageID messageID, uint
         return sendSyncMessageFromSecondaryThread(messageID, syncRequestID, encoder, timeout);
     }
 
-    if (!isValid())
+    if (!isValid()) {
+        didFailToSendSyncMessage();
         return nullptr;
+    }
 
     // Push the pending sync reply information on our stack.
     {
@@ -433,6 +435,9 @@ PassOwnPtr<MessageDecoder> Connection::sendSyncMessage(MessageID messageID, uint
         m_pendingSyncReplies.removeLast();
     }
 
+    if (!pendingReply.replyDecoder)
+        didFailToSendSyncMessage();
+
     return reply.release();
 }
 
@@ -440,20 +445,16 @@ PassOwnPtr<MessageDecoder> Connection::sendSyncMessageFromSecondaryThread(Messag
 {
     ASSERT(RunLoop::current() != m_clientRunLoop);
 
-    if (!isValid()) {
-        didFailToSendSyncMessage();
+    if (!isValid())
         return nullptr;
-    }
 
     SecondaryThreadPendingSyncReply pendingReply;
 
     // Push the pending sync reply information on our stack.
     {
         MutexLocker locker(m_syncReplyStateMutex);
-        if (!m_shouldWaitForSyncReplies) {
-            didFailToSendSyncMessage();
+        if (!m_shouldWaitForSyncReplies)
             return nullptr;
-        }
 
         ASSERT(!m_secondaryThreadPendingSyncReplyMap.contains(syncRequestID));
         m_secondaryThreadPendingSyncReplyMap.add(syncRequestID, &pendingReply);
@@ -474,9 +475,6 @@ PassOwnPtr<MessageDecoder> Connection::sendSyncMessageFromSecondaryThread(Messag
         m_secondaryThreadPendingSyncReplyMap.remove(syncRequestID);
     }
 
-    if (!pendingReply.replyDecoder)
-        didFailToSendSyncMessage();
-
     return adoptPtr(pendingReply.replyDecoder);
 }