Changeset 142656 in webkit
- Timestamp:
- Feb 12, 2013 12:56:57 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r142651 r142656 1 2013-02-12 Anders Carlsson <andersca@apple.com> 2 3 Change the queue client base class to be private everywhere 4 https://bugs.webkit.org/show_bug.cgi?id=109604 5 6 Reviewed by Andreas Kling. 7 8 Move connection queue client registration inside of the respective queue client classes. 9 10 Also, it's too late to add queue clients in ChildProcessProxy::didFinishLaunching, so do this in 11 ChildProcessProxy::connectionWillOpen instead. 12 13 Finally, assert that queue clients are only being added and removed from the client thread. 14 15 * NetworkProcess/NetworkProcess.cpp: 16 (WebKit::NetworkProcess::initializeConnection): 17 * Platform/CoreIPC/Connection.cpp: 18 (CoreIPC::Connection::addQueueClient): 19 (CoreIPC::Connection::removeQueueClient): 20 * Shared/mac/SecItemShim.cpp: 21 (WebKit::SecItemShim::initializeConnection): 22 (WebKit): 23 * Shared/mac/SecItemShim.h: 24 (SecItemShim): 25 * UIProcess/Network/NetworkProcessProxy.cpp: 26 (WebKit::NetworkProcessProxy::connectionWillOpen): 27 (WebKit): 28 (WebKit::NetworkProcessProxy::connectionWillClose): 29 (WebKit::NetworkProcessProxy::didFinishLaunching): 30 * UIProcess/Network/NetworkProcessProxy.h: 31 (NetworkProcessProxy): 32 * UIProcess/WebProcessProxy.cpp: 33 (WebKit::WebProcessProxy::connectionWillOpen): 34 (WebKit::WebProcessProxy::didFinishLaunching): 35 * UIProcess/mac/SecItemShimProxy.cpp: 36 (WebKit::SecItemShimProxy::initializeConnection): 37 (WebKit): 38 * UIProcess/mac/SecItemShimProxy.h: 39 (SecItemShimProxy): 40 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 41 (WebKit::PluginProcessConnectionManager::initializeConnection): 42 (WebKit): 43 * WebProcess/Plugins/PluginProcessConnectionManager.h: 44 (PluginProcessConnectionManager): 45 * WebProcess/WebPage/EventDispatcher.cpp: 46 (WebKit::EventDispatcher::initializeConnection): 47 (WebKit): 48 * WebProcess/WebPage/EventDispatcher.h: 49 (EventDispatcher): 50 * WebProcess/WebProcess.cpp: 51 (WebKit::WebProcess::initializeConnection): 52 1 53 2013-02-12 Brady Eidson <beidson@apple.com> 2 54 -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r142651 r142656 166 166 167 167 #if USE(SECURITY_FRAMEWORK) 168 connection->addQueueClient(&SecItemShim::shared());168 SecItemShim::shared().initializeConnection(connection); 169 169 #endif 170 170 } -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp
r141814 r142656 257 257 void Connection::addQueueClient(QueueClient* queueClient) 258 258 { 259 ASSERT(RunLoop::current() == m_clientRunLoop); 260 ASSERT(!m_isConnected); 261 259 262 m_connectionQueue->dispatch(WTF::bind(&Connection::addQueueClientOnWorkQueue, this, queueClient)); 260 263 } … … 262 265 void Connection::removeQueueClient(QueueClient* queueClient) 263 266 { 267 ASSERT(RunLoop::current() == m_clientRunLoop); 268 264 269 m_connectionQueue->dispatch(WTF::bind(&Connection::removeQueueClientOnWorkQueue, this, queueClient)); 265 270 } -
trunk/Source/WebKit2/Shared/mac/SecItemShim.cpp
r141820 r142656 133 133 } 134 134 135 void SecItemShim::initializeConnection(CoreIPC::Connection* connection) 136 { 137 connection->addQueueClient(this); 138 } 139 135 140 void SecItemShim::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, OwnPtr<CoreIPC::MessageDecoder>& decoder) 136 141 { -
trunk/Source/WebKit2/Shared/mac/SecItemShim.h
r141820 r142656 36 36 class SecItemResponseData; 37 37 38 class SecItemShim : p ublicCoreIPC::Connection::QueueClient {38 class SecItemShim : private CoreIPC::Connection::QueueClient { 39 39 WTF_MAKE_NONCOPYABLE(SecItemShim); 40 40 public: … … 42 42 43 43 void initialize(ChildProcess*); 44 void initializeConnection(CoreIPC::Connection*); 44 45 45 46 private: -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r142064 r142656 73 73 } 74 74 75 void NetworkProcessProxy::connectionWillOpen(CoreIPC::Connection* connection) 76 { 77 #if USE(SECURITY_FRAMEWORK) 78 SecItemShimProxy::shared().initializeConnection(connection); 79 #endif 80 } 81 82 void NetworkProcessProxy::connectionWillClose(CoreIPC::Connection*) 83 { 84 } 85 75 86 void NetworkProcessProxy::getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply) 76 87 { … … 169 180 ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); 170 181 171 #if USE(SECURITY_FRAMEWORK)172 connection()->addQueueClient(&SecItemShimProxy::shared());173 #endif174 175 182 if (CoreIPC::Connection::identifierIsNull(connectionIdentifier)) { 176 183 // FIXME: Do better cleanup here. -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
r142630 r142656 65 65 NetworkProcessProxy(WebContext*); 66 66 67 // ChildProcessProxy 67 68 virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) OVERRIDE; 69 virtual void connectionWillOpen(CoreIPC::Connection*) OVERRIDE; 70 virtual void connectionWillClose(CoreIPC::Connection*) OVERRIDE; 71 68 72 void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&); 69 70 73 void networkProcessCrashedOrFailedToLaunch(); 71 74 -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r142409 r142656 124 124 ASSERT(this->connection() == connection); 125 125 126 #if USE(SECURITY_FRAMEWORK) 127 SecItemShimProxy::shared().initializeConnection(connection); 128 #endif 129 126 130 m_context->processWillOpenConnection(this); 127 131 } … … 444 448 ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); 445 449 446 #if USE(SECURITY_FRAMEWORK)447 connection()->addQueueClient(&SecItemShimProxy::shared());448 #endif449 450 450 m_webConnection = WebConnectionToWebProcess::create(this); 451 451 -
trunk/Source/WebKit2/UIProcess/mac/SecItemShimProxy.cpp
r141820 r142656 45 45 SecItemShimProxy::SecItemShimProxy() 46 46 { 47 } 48 49 void SecItemShimProxy::initializeConnection(CoreIPC::Connection* connection) 50 { 51 connection->addQueueClient(this); 47 52 } 48 53 -
trunk/Source/WebKit2/UIProcess/mac/SecItemShimProxy.h
r141820 r142656 35 35 class SecItemRequestData; 36 36 37 class SecItemShimProxy : p ublicCoreIPC::Connection::QueueClient {37 class SecItemShimProxy : private CoreIPC::Connection::QueueClient { 38 38 WTF_MAKE_NONCOPYABLE(SecItemShimProxy); 39 39 public: 40 40 static SecItemShimProxy& shared(); 41 42 void initializeConnection(CoreIPC::Connection*); 41 43 42 44 private: -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
r142644 r142656 49 49 PluginProcessConnectionManager::~PluginProcessConnectionManager() 50 50 { 51 } 52 53 void PluginProcessConnectionManager::initializeConnection(CoreIPC::Connection* connection) 54 { 55 connection->addQueueClient(this); 51 56 } 52 57 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h
r142540 r142656 39 39 // Manages plug-in process connections for the given web process. 40 40 41 namespace CoreIPC {42 class Connection;43 }44 45 41 namespace WebKit { 46 42 47 43 class PluginProcessConnection; 48 44 49 class PluginProcessConnectionManager : p ublicCoreIPC::Connection::QueueClient {45 class PluginProcessConnectionManager : private CoreIPC::Connection::QueueClient { 50 46 WTF_MAKE_NONCOPYABLE(PluginProcessConnectionManager); 51 47 public: 52 48 PluginProcessConnectionManager(); 53 49 ~PluginProcessConnectionManager(); 50 51 void initializeConnection(CoreIPC::Connection*); 54 52 55 53 PluginProcessConnection* getPluginProcessConnection(const String& pluginPath, PluginProcess::Type); -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
r141820 r142656 73 73 } 74 74 #endif 75 76 void EventDispatcher::initializeConnection(CoreIPC::Connection* connection) 77 { 78 connection->addQueueClient(this); 79 } 75 80 76 81 void EventDispatcher::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, OwnPtr<CoreIPC::MessageDecoder>& decoder) -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h
r141820 r142656 47 47 #endif 48 48 49 class EventDispatcher : p ublicCoreIPC::Connection::QueueClient {49 class EventDispatcher : private CoreIPC::Connection::QueueClient { 50 50 WTF_MAKE_NONCOPYABLE(EventDispatcher); 51 51 … … 58 58 void removeScrollingTreeForPage(WebPage*); 59 59 #endif 60 61 void initializeConnection(CoreIPC::Connection*); 60 62 61 63 private: -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r142651 r142656 206 206 207 207 connection->setShouldExitOnSyncMessageSendFailure(true); 208 connection->addQueueClient(&m_eventDispatcher); 208 209 m_eventDispatcher.initializeConnection(connection); 209 210 210 211 #if ENABLE(PLUGIN_PROCESS) 211 connection->addQueueClient(&m_pluginProcessConnectionManager);212 m_pluginProcessConnectionManager.initializeConnection(connection); 212 213 #endif 213 214 214 215 #if USE(SECURITY_FRAMEWORK) 215 connection->addQueueClient(&SecItemShim::shared());216 SecItemShim::shared().initializeConnection(connection); 216 217 #endif 217 218
Note: See TracChangeset
for help on using the changeset viewer.