diff options
author | Steve Block <steveblock@google.com> | 2011-05-25 19:08:45 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-08 13:51:31 +0100 |
commit | 2bde8e466a4451c7319e3a072d118917957d6554 (patch) | |
tree | 28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebKit2/Platform/CoreIPC/Connection.h | |
parent | 6939c99b71d9372d14a0c74a772108052e8c48c8 (diff) | |
download | external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2 |
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebKit2/Platform/CoreIPC/Connection.h')
-rw-r--r-- | Source/WebKit2/Platform/CoreIPC/Connection.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/WebKit2/Platform/CoreIPC/Connection.h b/Source/WebKit2/Platform/CoreIPC/Connection.h index eaa2ab9..b6a2415 100644 --- a/Source/WebKit2/Platform/CoreIPC/Connection.h +++ b/Source/WebKit2/Platform/CoreIPC/Connection.h @@ -72,7 +72,7 @@ enum MessageSendFlags { } \ while (0) -class Connection : public ThreadSafeShared<Connection> { +class Connection : public ThreadSafeRefCounted<Connection> { public: class MessageReceiver { protected: @@ -114,6 +114,8 @@ public: void setShouldCloseConnectionOnProcessTermination(WebKit::PlatformProcessIdentifier); #endif + void setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(bool); + // The set callback will be called on the connection work queue when the connection is closed, // before didCall is called on the client thread. Must be called before the connection is opened. // In the future we might want a more generic way to handle sync or async messages directly @@ -191,6 +193,8 @@ private: // Called on the connection work queue. void processIncomingMessage(MessageID, PassOwnPtr<ArgumentDecoder>); + void processIncomingSyncReply(PassOwnPtr<ArgumentDecoder>); + bool canSendOutgoingMessages() const; bool platformCanSendOutgoingMessages() const; void sendOutgoingMessages(); @@ -212,13 +216,15 @@ private: bool m_isServer; uint64_t m_syncRequestID; + bool m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage; DidCloseOnConnectionWorkQueueCallback m_didCloseOnConnectionWorkQueueCallback; bool m_isConnected; WorkQueue m_connectionQueue; RunLoop* m_clientRunLoop; - uint32_t m_inDispatchMessageCount; + unsigned m_inDispatchMessageCount; + unsigned m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount; bool m_didReceiveInvalidMessage; // Incoming messages. @@ -336,7 +342,7 @@ template<typename T> bool Connection::sendSync(const T& message, const typename argumentEncoder->encode(message); // Now send the message and wait for a reply. - OwnPtr<ArgumentDecoder> replyDecoder = sendSyncMessage(MessageID(T::messageID, MessageID::SyncMessage), syncRequestID, argumentEncoder.release(), timeout); + OwnPtr<ArgumentDecoder> replyDecoder = sendSyncMessage(MessageID(T::messageID), syncRequestID, argumentEncoder.release(), timeout); if (!replyDecoder) return false; @@ -367,7 +373,7 @@ inline bool Connection::deprecatedSendSync(E messageID, uint64_t destinationID, argumentEncoder->encode(arguments); // Now send the message and wait for a reply. - OwnPtr<ArgumentDecoder> replyDecoder = sendSyncMessage(MessageID(messageID, MessageID::SyncMessage), syncRequestID, argumentEncoder.release(), timeout); + OwnPtr<ArgumentDecoder> replyDecoder = sendSyncMessage(MessageID(messageID), syncRequestID, argumentEncoder.release(), timeout); if (!replyDecoder) return false; |