Changeset 85573 in webkit
- Timestamp:
- May 2, 2011 6:48:32 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85571 r85573 1 2011-05-02 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 The web process locks up when the plug-in process crashes 6 https://bugs.webkit.org/show_bug.cgi?id=59999 7 <rdar://problem/8889303> 8 9 Add a hash map from plug-in paths to CoreIPC connections to PluginProcessConnectionManager. 10 Add PluginProcessConnectionManager::pluginProcessCrashed and make it look up the corresponding 11 CoreIPC connection and call postConnectionDidCloseOnConnectionWorkQueue on it. 12 13 * Platform/CoreIPC/Connection.cpp: 14 (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue): 15 * Platform/CoreIPC/Connection.h: 16 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 17 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): 18 (WebKit::PluginProcessConnectionManager::removePluginProcessConnection): 19 (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): 20 * WebProcess/Plugins/PluginProcessConnectionManager.h: 21 * WebProcess/WebProcess.cpp: 22 (WebKit::WebProcess::pluginProcessCrashed): 23 1 24 2011-05-02 Anders Carlsson <andersca@apple.com> 2 25 -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp
r85515 r85573 551 551 } 552 552 553 void Connection::postConnectionDidCloseOnConnectionWorkQueue() 554 { 555 m_connectionQueue.scheduleWork(WorkItem::create(this, &Connection::connectionDidClose)); 556 } 557 553 558 void Connection::connectionDidClose() 554 559 { -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.h
r85515 r85573 148 148 void setDefaultSyncMessageTimeout(double); 149 149 150 void postConnectionDidCloseOnConnectionWorkQueue(); 151 150 152 static const int DefaultTimeout = 0; 151 153 static const int NoTimeout = -1; -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
r85566 r85573 76 76 m_pluginProcessConnections.append(pluginProcessConnection); 77 77 78 { 79 MutexLocker locker(m_pathsAndConnectionsMutex); 80 ASSERT(!m_pathsAndConnections.contains(pluginProcessConnection->pluginPath())); 81 82 m_pathsAndConnections.set(pluginPath, pluginProcessConnection->connection()); 83 } 84 78 85 return pluginProcessConnection.get(); 79 86 } … … 84 91 ASSERT(vectorIndex != notFound); 85 92 93 { 94 MutexLocker locker(m_pathsAndConnectionsMutex); 95 ASSERT(m_pathsAndConnections.contains(pluginProcessConnection->pluginPath())); 96 97 m_pathsAndConnections.remove(pluginProcessConnection->pluginPath()); 98 } 99 86 100 m_pluginProcessConnections.remove(vectorIndex); 101 } 102 103 void PluginProcessConnectionManager::pluginProcessCrashed(const String& pluginPath) 104 { 105 MutexLocker locker(m_pathsAndConnectionsMutex); 106 CoreIPC::Connection* connection = m_pathsAndConnections.get(pluginPath).get(); 107 108 // It's OK for connection to be null here; it will happen if this web process doesn't know 109 // anything about the plug-in process. 110 if (!connection) 111 return; 112 113 connection->postConnectionDidCloseOnConnectionWorkQueue(); 87 114 } 88 115 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h
r85566 r85573 30 30 31 31 #include <wtf/Forward.h> 32 #include <wtf/HashMap.h> 32 33 #include <wtf/Noncopyable.h> 34 #include <wtf/Threading.h> 33 35 #include <wtf/Vector.h> 36 #include <wtf/text/StringHash.h> 34 37 35 38 // Manages plug-in process connections for the given web process. 39 40 namespace CoreIPC { 41 class Connection; 42 } 36 43 37 44 namespace WebKit { … … 48 55 void removePluginProcessConnection(PluginProcessConnection*); 49 56 57 // Called on the web process connection work queue. 58 void pluginProcessCrashed(const String& pluginPath); 59 50 60 private: 51 61 Vector<RefPtr<PluginProcessConnection> > m_pluginProcessConnections; 62 63 Mutex m_pathsAndConnectionsMutex; 64 HashMap<String, RefPtr<CoreIPC::Connection> > m_pathsAndConnections; 52 65 }; 53 66 -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r85570 r85573 797 797 void WebProcess::pluginProcessCrashed(const String& pluginPath) 798 798 { 799 // FIXME: Implement.799 m_pluginProcessConnectionManager.pluginProcessCrashed(pluginPath); 800 800 } 801 801 #endif
Note: See TracChangeset
for help on using the changeset viewer.