Title: [248634] trunk/Source/WebKit
Revision
248634
Author
cdu...@apple.com
Date
2019-08-13 14:00:49 -0700 (Tue, 13 Aug 2019)

Log Message

Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction()
https://bugs.webkit.org/show_bug.cgi?id=200688

Reviewed by Alex Christensen.

Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction().
It passes a RegistrableDomain to another thread without isolated copying it.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248633 => 248634)


--- trunk/Source/WebKit/ChangeLog	2019-08-13 20:58:19 UTC (rev 248633)
+++ trunk/Source/WebKit/ChangeLog	2019-08-13 21:00:49 UTC (rev 248634)
@@ -1,5 +1,18 @@
 2019-08-13  Chris Dumez  <cdu...@apple.com>
 
+        Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction()
+        https://bugs.webkit.org/show_bug.cgi?id=200688
+
+        Reviewed by Alex Christensen.
+
+        Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction().
+        It passes a RegistrableDomain to another thread without isolated copying it.
+
+        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+        (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
+
+2019-08-13  Chris Dumez  <cdu...@apple.com>
+
         Fix potential thread safety issue under StorageManager::getSessionStorageOrigins()
         https://bugs.webkit.org/show_bug.cgi?id=200684
 

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (248633 => 248634)


--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-08-13 20:58:19 UTC (rev 248633)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-08-13 21:00:49 UTC (rev 248634)
@@ -600,7 +600,7 @@
 {
     ASSERT(RunLoop::isMain());
 
-    postTask([this, domain, completionHandler = WTFMove(completionHandler)]() mutable {
+    postTask([this, domain = domain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
         bool hadUserInteraction = m_statisticsStore ? m_statisticsStore->hasHadUserInteraction(domain, OperatingDatesWindow::Long) : false;
         postTaskReply([hadUserInteraction, completionHandler = WTFMove(completionHandler)]() mutable {
             completionHandler(hadUserInteraction);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to