[webkit-reviews] review granted: [Bug 229435] ThreadSanitizer: data race of WTF::StringImpl in WebCoreNSURLSessionDataTask._metrics instance variable : [Attachment 436258] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 23 19:47:45 PDT 2021


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 229435: ThreadSanitizer: data race of WTF::StringImpl in
WebCoreNSURLSessionDataTask._metrics instance variable
https://bugs.webkit.org/show_bug.cgi?id=229435

Attachment 436258: Patch

https://bugs.webkit.org/attachment.cgi?id=436258&action=review




--- Comment #4 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 436258
  --> https://bugs.webkit.org/attachment.cgi?id=436258
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=436258&action=review

r=me but consider the comment.

> Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:948
> +	       [delegate URLSession:(NSURLSession *)strongSession.get()
task:(NSURLSessionDataTask *)strongSelf.get()
didFinishCollectingMetrics:(NSURLSessionTaskMetrics
*)adoptNS([[WebCoreNSURLSessionTaskMetrics alloc]
_initWithMetrics:metrics.isolatedCopy()]).get()];

Line 944 already calls `metrics = metrics.isolatedCopy()`.  Can we just call
WTFMove(metrics) here?


More information about the webkit-reviews mailing list