Title: [261717] trunk/Source/WebKit
Revision
261717
Author
[email protected]
Date
2020-05-14 15:45:38 -0700 (Thu, 14 May 2020)

Log Message

WebsiteDataStore functions should only send IPC to WebProcesses that are associated with its session
https://bugs.webkit.org/show_bug.cgi?id=211917

Reviewed by Alex Christensen.

WebsiteDataStore functions should only send IPC to WebProcesses that are associated with its session.
setResourceLoadStatisticsEnabled() / clearResourceLoadStatisticsInWebProcesses() were talking to all
WebProcesses, even those associated with other sessions, which was wrong.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::clearResourceLoadStatistics): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (261716 => 261717)


--- trunk/Source/WebKit/ChangeLog	2020-05-14 22:42:45 UTC (rev 261716)
+++ trunk/Source/WebKit/ChangeLog	2020-05-14 22:45:38 UTC (rev 261717)
@@ -1,3 +1,21 @@
+2020-05-14  Chris Dumez  <[email protected]>
+
+        WebsiteDataStore functions should only send IPC to WebProcesses that are associated with its session
+        https://bugs.webkit.org/show_bug.cgi?id=211917
+
+        Reviewed by Alex Christensen.
+
+        WebsiteDataStore functions should only send IPC to WebProcesses that are associated with its session.
+        setResourceLoadStatisticsEnabled() / clearResourceLoadStatisticsInWebProcesses() were talking to all
+        WebProcesses, even those associated with other sessions, which was wrong.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::clearResourceLoadStatistics): Deleted.
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
+        (WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):
+
 2020-05-14  Daniel Bates  <[email protected]>
 
         [iOS] Remove dead dictation code

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (261716 => 261717)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2020-05-14 22:42:45 UTC (rev 261716)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2020-05-14 22:45:38 UTC (rev 261717)
@@ -1542,11 +1542,6 @@
     sendToAllProcesses(Messages::WebProcess::SetShouldUseFontSmoothing(useFontSmoothing));
 }
 
-void WebProcessPool::clearResourceLoadStatistics()
-{
-    sendToAllProcesses(Messages::WebProcess::ClearResourceLoadStatistics());
-}
-
 void WebProcessPool::registerURLSchemeAsEmptyDocument(const String& urlScheme)
 {
     m_schemesToRegisterAsEmptyDocument.add(urlScheme);

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (261716 => 261717)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.h	2020-05-14 22:42:45 UTC (rev 261716)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h	2020-05-14 22:45:38 UTC (rev 261717)
@@ -456,8 +456,6 @@
         return m_hiddenPageThrottlingAutoIncreasesCounter.count();
     }
 
-    void clearResourceLoadStatistics();
-
     bool alwaysRunsAtBackgroundPriority() const { return m_alwaysRunsAtBackgroundPriority; }
     bool shouldTakeUIBackgroundAssertion() const { return m_shouldTakeUIBackgroundAssertion; }
 

Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (261716 => 261717)


--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2020-05-14 22:42:45 UTC (rev 261716)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2020-05-14 22:45:38 UTC (rev 261717)
@@ -2082,7 +2082,7 @@
         
         for (auto& processPool : processPools()) {
             processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(m_sessionID, true));
-            processPool->sendToAllProcesses(Messages::WebProcess::SetResourceLoadStatisticsEnabled(true));
+            processPool->sendToAllProcessesForSession(Messages::WebProcess::SetResourceLoadStatisticsEnabled(true), m_sessionID);
         }
         return;
     }
@@ -2089,7 +2089,7 @@
 
     for (auto& processPool : processPools()) {
         processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(m_sessionID, false));
-        processPool->sendToAllProcesses(Messages::WebProcess::SetResourceLoadStatisticsEnabled(false));
+        processPool->sendToAllProcessesForSession(Messages::WebProcess::SetResourceLoadStatisticsEnabled(false), m_sessionID);
     }
 
     m_resourceLoadStatisticsEnabled = false;
@@ -2167,7 +2167,7 @@
 {
     if (resourceLoadStatisticsEnabled()) {
         for (auto& processPool : processPools())
-            processPool->clearResourceLoadStatistics();
+            processPool->sendToAllProcessesForSession(Messages::WebProcess::ClearResourceLoadStatistics(), m_sessionID);
     }
     callback();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to