Changeset 62837 in webkit
- Timestamp:
- Jul 8, 2010 2:17:12 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r62825 r62837 1 2010-07-08 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Move socket objects to connection's thread 6 https://bugs.webkit.org/show_bug.cgi?id=41897 7 8 To receive network related notifications in the WorkQueue thread, the 9 QLocalSocket instances must be moved to that thread. 10 11 * Platform/CoreIPC/qt/ConnectionQt.cpp: 12 (CoreIPC::Connection::open): 13 * Platform/WorkQueue.h: 14 * Platform/qt/WorkQueueQt.cpp: 15 (WorkQueue::moveSocketToWorkThread): 16 1 17 2010-07-08 Alice Liu <alice.liu@apple.com> 2 18 -
trunk/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
r62790 r62837 92 92 m_socket = WebKit::ProcessLauncher::takePendingConnection(); 93 93 m_isConnected = m_socket; 94 if (m_isConnected) 94 if (m_isConnected) { 95 m_connectionQueue.moveSocketToWorkThread(m_socket); 95 96 m_connectionQueue.connectSignal(m_socket, SIGNAL(readyRead()), WorkItem::create(this, &Connection::readyReadHandler)); 97 } 96 98 } else { 97 99 m_socket = new QLocalSocket(); 98 100 m_socket->connectToServer(m_serverName); 101 m_connectionQueue.moveSocketToWorkThread(m_socket); 99 102 m_connectionQueue.connectSignal(m_socket, SIGNAL(readyRead()), WorkItem::create(this, &Connection::readyReadHandler)); 100 103 m_isConnected = m_socket->waitForConnected(); -
trunk/WebKit2/Platform/WorkQueue.h
r62358 r62837 39 39 40 40 #if PLATFORM(QT) 41 class QLocalSocket; 41 42 class QObject; 42 43 class QThread; … … 69 70 #elif PLATFORM(QT) 70 71 void connectSignal(QObject*, const char* signal, std::auto_ptr<WorkItem>); 71 void disconnectSignal(QObject*, const char* signa); 72 void disconnectSignal(QObject*, const char* signal); 73 74 void moveSocketToWorkThread(QLocalSocket*); 72 75 #endif 73 76 -
trunk/WebKit2/Platform/qt/WorkQueueQt.cpp
r62256 r62837 27 27 #include "WorkQueue.h" 28 28 29 #include <QLocalSocket> 29 30 #include <QObject> 30 31 #include <QThread> … … 93 94 } 94 95 96 void WorkQueue::moveSocketToWorkThread(QLocalSocket* socket) 97 { 98 ASSERT(m_workThread); 99 ASSERT(socket); 100 101 socket->setParent(0); 102 socket->moveToThread(m_workThread); 103 } 104 95 105 void WorkQueue::platformInitialize(const char*) 96 106 {
Note: See TracChangeset
for help on using the changeset viewer.