Title: [142792] trunk/Source/WebKit2
Revision
142792
Author
[email protected]
Date
2013-02-13 13:49:23 -0800 (Wed, 13 Feb 2013)

Log Message

Remove Connection::QueueClient
https://bugs.webkit.org/show_bug.cgi?id=109744

Reviewed by Sam Weinig.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::processIncomingMessage):
(CoreIPC::Connection::connectionDidClose):
* Platform/CoreIPC/Connection.h:
(Connection):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (142791 => 142792)


--- trunk/Source/WebKit2/ChangeLog	2013-02-13 21:48:40 UTC (rev 142791)
+++ trunk/Source/WebKit2/ChangeLog	2013-02-13 21:49:23 UTC (rev 142792)
@@ -1,5 +1,18 @@
 2013-02-13  Anders Carlsson  <[email protected]>
 
+        Remove Connection::QueueClient
+        https://bugs.webkit.org/show_bug.cgi?id=109744
+
+        Reviewed by Sam Weinig.
+
+        * Platform/CoreIPC/Connection.cpp:
+        (CoreIPC::Connection::processIncomingMessage):
+        (CoreIPC::Connection::connectionDidClose):
+        * Platform/CoreIPC/Connection.h:
+        (Connection):
+
+2013-02-13  Anders Carlsson  <[email protected]>
+
         Try to fix the Lion build.
 
         * WebProcess/WebPage/EventDispatcher.h:

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp (142791 => 142792)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2013-02-13 21:48:40 UTC (rev 142791)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2013-02-13 21:49:23 UTC (rev 142792)
@@ -254,21 +254,6 @@
     m_shouldExitOnSyncMessageSendFailure = shouldExitOnSyncMessageSendFailure;
 }
 
-void Connection::addQueueClient(QueueClient* queueClient)
-{
-    ASSERT(RunLoop::current() == m_clientRunLoop);
-    ASSERT(!m_isConnected);
-
-    m_connectionQueue->dispatch(WTF::bind(&Connection::addQueueClientOnWorkQueue, this, queueClient));
-}
-
-void Connection::removeQueueClient(QueueClient* queueClient)
-{
-    ASSERT(RunLoop::current() == m_clientRunLoop);
-
-    m_connectionQueue->dispatch(WTF::bind(&Connection::removeQueueClientOnWorkQueue, this, queueClient));
-}
-
 void Connection::addWorkQueueMessageReceiver(StringReference messageReceiverName, WorkQueue* workQueue, WorkQueueMessageReceiver* workQueueMessageReceiver)
 {
     ASSERT(RunLoop::current() == m_clientRunLoop);
@@ -306,19 +291,6 @@
     workQueueMessageReceiver->didReceiveMessage(this, *decoder);
 }
 
-void Connection::addQueueClientOnWorkQueue(QueueClient* queueClient)
-{
-    ASSERT(!m_connectionQueueClients.contains(queueClient));
-    m_connectionQueueClients.append(queueClient);
-}
-
-void Connection::removeQueueClientOnWorkQueue(QueueClient* queueClient)
-{
-    size_t index = m_connectionQueueClients.find(queueClient);
-    ASSERT(index != notFound);
-    m_connectionQueueClients.remove(index);
-}
-
 void Connection::setDidCloseOnConnectionWorkQueueCallback(DidCloseOnConnectionWorkQueueCallback callback)
 {
     ASSERT(!m_isConnected);
@@ -648,15 +620,6 @@
         return;
     }
 
-    // Hand off the message to the connection queue clients.
-    for (size_t i = 0; i < m_connectionQueueClients.size(); ++i) {
-        m_connectionQueueClients[i]->didReceiveMessageOnConnectionWorkQueue(this, message);
-        if (!message) {
-            // A connection queue client handled the message, our work here is done.
-            return;
-        }
-    }
-
     enqueueIncomingMessage(message.release());
 }
 
@@ -683,9 +646,6 @@
             iter->value->semaphore.signal();
     }
 
-    for (size_t i = 0; i < m_connectionQueueClients.size(); ++i)
-        m_connectionQueueClients[i]->didCloseOnConnectionWorkQueue(this);
-
     if (m_didCloseOnConnectionWorkQueueCallback)
         m_didCloseOnConnectionWorkQueueCallback(this);
 

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.h (142791 => 142792)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.h	2013-02-13 21:48:40 UTC (rev 142791)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.h	2013-02-13 21:49:23 UTC (rev 142792)
@@ -95,15 +95,6 @@
     class WorkQueueMessageReceiver : public MessageReceiver, public ThreadSafeRefCounted<WorkQueueMessageReceiver> {
     };
 
-    class QueueClient {
-    public:
-        virtual void didReceiveMessageOnConnectionWorkQueue(Connection*, OwnPtr<MessageDecoder>&) = 0;
-        virtual void didCloseOnConnectionWorkQueue(Connection*) = 0;
-
-    protected:
-        virtual ~QueueClient() { }
-    };
-
 #if OS(DARWIN)
     struct Identifier {
         Identifier()
@@ -171,9 +162,6 @@
     void addWorkQueueMessageReceiver(StringReference messageReceiverName, WorkQueue*, WorkQueueMessageReceiver*);
     void removeWorkQueueMessageReceiver(StringReference messageReceiverName);
 
-    void addQueueClient(QueueClient*);
-    void removeQueueClient(QueueClient*);
-
     bool open();
     void invalidate();
     void markCurrentlyDispatchedMessageAsInvalid();
@@ -216,9 +204,6 @@
     void removeWorkQueueMessageReceiverOnConnectionWorkQueue(StringReference messageReceiverName);
     void dispatchWorkQueueMessageReceiverMessage(WorkQueueMessageReceiver*, MessageDecoder*);
 
-    void addQueueClientOnWorkQueue(QueueClient*);
-    void removeQueueClientOnWorkQueue(QueueClient*);
-    
     bool canSendOutgoingMessages() const;
     bool platformCanSendOutgoingMessages() const;
     void sendOutgoingMessages();
@@ -248,8 +233,6 @@
     RefPtr<WorkQueue> m_connectionQueue;
     WebCore::RunLoop* m_clientRunLoop;
 
-    Vector<QueueClient*> m_connectionQueueClients;
-
     HashMap<StringReference, std::pair<RefPtr<WorkQueue>, RefPtr<WorkQueueMessageReceiver> > > m_workQueueMessageReceivers;
 
     unsigned m_inDispatchMessageCount;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to