haikuwebkit/Source/WebKit/NetworkProcess/Classifier
David Kilzer 18d3311856 Bug 229112: ThreadSanitizer: data races of WTF::String in WebResourceLoadStatisticsStore
<https://webkit.org/b/229112>
<rdar://problem/81940951>

Reviewed by Kate Cheney.

Source/WebCore:

Covered by running layout tests with TSan in:
    http/tests/privateClickMeasurement/

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
- Add WTFMove() for updated SourceSite constructor.  Verified
  that this doesn't create a use-after-move issue.

* loader/PrivateClickMeasurement.h:
(WebCore::PrivateClickMeasurement::SourceSite::SourceSite):
- Change to take rvalue reference for efficiency and to match
  AttributionDestinationSite constructor.
(WebCore::PrivateClickMeasurement::SourceSite::isolatedCopy const): Add.
(WebCore::PrivateClickMeasurement::AttributionDestinationSite::isolatedCopy const): Add.
- Add isolatedCopy() methods to use in multi-threaded scenarios.

Source/WebKit:

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::attributePrivateClickMeasurement):
- Make isolated copies of sourceSite and destinationSite to fix
  data races.
(WebKit::WebResourceLoadStatisticsStore::privateClickMeasurementToString):
- Make isolated copy of WTF::String to fix data race.


Canonical link: https://commits.webkit.org/240527@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-15 20:05:28 +00:00
..
ResourceLoadStatisticsDatabaseStore.cpp Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00
ResourceLoadStatisticsDatabaseStore.h Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00
ResourceLoadStatisticsMemoryStore.cpp Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00
ResourceLoadStatisticsMemoryStore.h Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00
ResourceLoadStatisticsStore.cpp Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00
ResourceLoadStatisticsStore.h Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00
ShouldGrandfatherStatistics.h
StorageAccessStatus.h
WebResourceLoadStatisticsStore.cpp Bug 229112: ThreadSanitizer: data races of WTF::String in WebResourceLoadStatisticsStore 2021-08-15 20:05:28 +00:00
WebResourceLoadStatisticsStore.h Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner 2021-08-11 22:25:56 +00:00