Title: [218499] trunk/Source/WebKit2
- Revision
- 218499
- Author
- cdu...@apple.com
- Date
- 2017-06-19 11:21:58 -0700 (Mon, 19 Jun 2017)
Log Message
[WK2] Add WKProcessPool SPI to efficiently reset all plugin load client policies
https://bugs.webkit.org/show_bug.cgi?id=173472
<rdar://problem/28858817>
Reviewed by Antti Koivisto.
Follow-up to r218419 to avoid copying the HashMap unnecessarily.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resetPluginLoadClientPolicies):
* UIProcess/WebProcessPool.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (218498 => 218499)
--- trunk/Source/WebKit2/ChangeLog 2017-06-19 17:44:20 UTC (rev 218498)
+++ trunk/Source/WebKit2/ChangeLog 2017-06-19 18:21:58 UTC (rev 218499)
@@ -1,3 +1,17 @@
+2017-06-19 Chris Dumez <cdu...@apple.com>
+
+ [WK2] Add WKProcessPool SPI to efficiently reset all plugin load client policies
+ https://bugs.webkit.org/show_bug.cgi?id=173472
+ <rdar://problem/28858817>
+
+ Reviewed by Antti Koivisto.
+
+ Follow-up to r218419 to avoid copying the HashMap unnecessarily.
+
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::resetPluginLoadClientPolicies):
+ * UIProcess/WebProcessPool.h:
+
2017-06-19 Youenn Fablet <you...@apple.com>
A cloned MediaStreamTrack should mute independently other tracks using the same source
Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (218498 => 218499)
--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp 2017-06-19 17:44:20 UTC (rev 218498)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp 2017-06-19 18:21:58 UTC (rev 218499)
@@ -1595,18 +1595,9 @@
sendToAllProcesses(Messages::WebProcess::SetPluginLoadClientPolicy(policy, host, bundleIdentifier, versionString));
}
-void WebProcessPool::resetPluginLoadClientPolicies(const HashMap<String, HashMap<String, HashMap<String, uint8_t>>>& pluginLoadClientPolicies)
+void WebProcessPool::resetPluginLoadClientPolicies(HashMap<String, HashMap<String, HashMap<String, uint8_t>>>&& pluginLoadClientPolicies)
{
- m_pluginLoadClientPolicies.clear();
-
- for (auto& hostPair : pluginLoadClientPolicies) {
- auto& policiesForHost = m_pluginLoadClientPolicies.ensure(hostPair.key, [] { return HashMap<String, HashMap<String, uint8_t>>(); }).iterator->value;
- for (auto& bundleIdentifierPair : hostPair.value) {
- auto& versionsToPolicies = policiesForHost.ensure(bundleIdentifierPair.key, [] { return HashMap<String, uint8_t>(); }).iterator->value;
- for (auto& versionPair : bundleIdentifierPair.value)
- versionsToPolicies.set(versionPair.key, versionPair.value);
- }
- }
+ m_pluginLoadClientPolicies = WTFMove(pluginLoadClientPolicies);
sendToAllProcesses(Messages::WebProcess::ResetPluginLoadClientPolicies(m_pluginLoadClientPolicies));
}
Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (218498 => 218499)
--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h 2017-06-19 17:44:20 UTC (rev 218498)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h 2017-06-19 18:21:58 UTC (rev 218499)
@@ -197,7 +197,7 @@
PluginInfoStore& pluginInfoStore() { return m_pluginInfoStore; }
void setPluginLoadClientPolicy(WebCore::PluginLoadClientPolicy, const String& host, const String& bundleIdentifier, const String& versionString);
- void resetPluginLoadClientPolicies(const HashMap<String, HashMap<String, HashMap<String, uint8_t>>>&);
+ void resetPluginLoadClientPolicies(HashMap<String, HashMap<String, HashMap<String, uint8_t>>>&&);
void clearPluginClientPolicies();
const HashMap<String, HashMap<String, HashMap<String, uint8_t>>>& pluginLoadClientPolicies() const { return m_pluginLoadClientPolicies; }
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes