diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-30 16:58:06 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-30 17:03:09 +0100 |
commit | 32ea33253afbbdefd2680aa95ab5f57455272ae7 (patch) | |
tree | 2389569585b666c310fbb36d3fb8e6ab94462967 /Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp | |
parent | 41c25f231cbca1babc445187283524cc6c751c71 (diff) | |
download | qtwebkit-32ea33253afbbdefd2680aa95ab5f57455272ae7.tar.gz |
Imported WebKit commit 6a4a1d32e1d779548c726c4826cba9d69eb87601 (http://svn.webkit.org/repository/webkit/trunk@136242)
Final import for the Qt 5.x series that implements the QtWebKit / QtWebKitWidgets split
Extra fixes will be cherry-picked.
Change-Id: I844f1ebb99c6d6b75db31d6538c2acd628e79681
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp b/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp index b77050992..64bfc2b7d 100644 --- a/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp +++ b/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp @@ -49,16 +49,17 @@ PluginProcessConnectionManager::~PluginProcessConnectionManager() { } -PluginProcessConnection* PluginProcessConnectionManager::getPluginProcessConnection(const String& pluginPath) +PluginProcessConnection* PluginProcessConnectionManager::getPluginProcessConnection(const String& pluginPath, PluginProcess::Type processType) { for (size_t i = 0; i < m_pluginProcessConnections.size(); ++i) { - if (m_pluginProcessConnections[i]->pluginPath() == pluginPath) - return m_pluginProcessConnections[i].get(); + RefPtr<PluginProcessConnection>& pluginProcessConnection = m_pluginProcessConnections[i]; + if (pluginProcessConnection->pluginPath() == pluginPath && pluginProcessConnection->processType() == processType) + return pluginProcessConnection.get(); } CoreIPC::Attachment encodedConnectionIdentifier; bool supportsAsynchronousInitialization; - if (!WebProcess::shared().connection()->sendSync(Messages::WebProcessProxy::GetPluginProcessConnection(pluginPath), + if (!WebProcess::shared().connection()->sendSync(Messages::WebProcessProxy::GetPluginProcessConnection(pluginPath, processType), Messages::WebProcessProxy::GetPluginProcessConnection::Reply(encodedConnectionIdentifier, supportsAsynchronousInitialization), 0)) return 0; @@ -72,14 +73,14 @@ PluginProcessConnection* PluginProcessConnectionManager::getPluginProcessConnect return 0; #endif - RefPtr<PluginProcessConnection> pluginProcessConnection = PluginProcessConnection::create(this, pluginPath, connectionIdentifier, supportsAsynchronousInitialization); + RefPtr<PluginProcessConnection> pluginProcessConnection = PluginProcessConnection::create(this, pluginPath, processType, connectionIdentifier, supportsAsynchronousInitialization); m_pluginProcessConnections.append(pluginProcessConnection); { MutexLocker locker(m_pathsAndConnectionsMutex); - ASSERT(!m_pathsAndConnections.contains(pluginProcessConnection->pluginPath())); + ASSERT(!m_pathsAndConnections.contains(std::make_pair(pluginProcessConnection->pluginPath(), processType))); - m_pathsAndConnections.set(pluginPath, pluginProcessConnection->connection()); + m_pathsAndConnections.set(std::make_pair(pluginPath, processType), pluginProcessConnection->connection()); } return pluginProcessConnection.get(); @@ -92,18 +93,18 @@ void PluginProcessConnectionManager::removePluginProcessConnection(PluginProcess { MutexLocker locker(m_pathsAndConnectionsMutex); - ASSERT(m_pathsAndConnections.contains(pluginProcessConnection->pluginPath())); + ASSERT(m_pathsAndConnections.contains(std::make_pair(pluginProcessConnection->pluginPath(), pluginProcessConnection->processType()))); - m_pathsAndConnections.remove(pluginProcessConnection->pluginPath()); + m_pathsAndConnections.remove(std::make_pair(pluginProcessConnection->pluginPath(), pluginProcessConnection->processType())); } m_pluginProcessConnections.remove(vectorIndex); } -void PluginProcessConnectionManager::pluginProcessCrashed(const String& pluginPath) +void PluginProcessConnectionManager::pluginProcessCrashed(const String& pluginPath, PluginProcess::Type processType) { MutexLocker locker(m_pathsAndConnectionsMutex); - CoreIPC::Connection* connection = m_pathsAndConnections.get(pluginPath).get(); + CoreIPC::Connection* connection = m_pathsAndConnections.get(std::make_pair(pluginPath, processType)).get(); // It's OK for connection to be null here; it will happen if this web process doesn't know // anything about the plug-in process. |