Changeset 248634 in webkit


Ignore:
Timestamp:
Aug 13, 2019 2:00:49 PM (5 years ago)
Author:
Chris Dumez
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r248633 r248634  
     12019-08-13  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction()
     4        https://bugs.webkit.org/show_bug.cgi?id=200688
     5
     6        Reviewed by Alex Christensen.
     7
     8        Fix potential thread safety issue under WebResourceLoadStatisticsStore::hasHadUserInteraction().
     9        It passes a RegistrableDomain to another thread without isolated copying it.
     10
     11        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     12        (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
     13
    1142019-08-13  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r248401 r248634  
    601601    ASSERT(RunLoop::isMain());
    602602
    603     postTask([this, domain, completionHandler = WTFMove(completionHandler)]() mutable {
     603    postTask([this, domain = domain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
    604604        bool hadUserInteraction = m_statisticsStore ? m_statisticsStore->hasHadUserInteraction(domain, OperatingDatesWindow::Long) : false;
    605605        postTaskReply([hadUserInteraction, completionHandler = WTFMove(completionHandler)]() mutable {
Note: See TracChangeset for help on using the changeset viewer.