[webkit-reviews] review granted: [Bug 198957] Add WTF::crossThreadCopy(T&&) to utilize String::isolatedCopy() && : [Attachment 372332] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 18 14:49:00 PDT 2019

Alex Christensen <achristensen at apple.com> has granted Fujii Hironori
<Hironori.Fujii at sony.com>'s request for review:
Bug 198957: Add WTF::crossThreadCopy(T&&) to utilize String::isolatedCopy() &&

Attachment 372332: Patch


--- Comment #4 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 372332
  --> https://bugs.webkit.org/attachment.cgi?id=372332

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

Great optimization.  r=me

> Tools/TestWebKitAPI/Tests/WTF/CrossThreadCopier.cpp:48
> +    // moved-out RefPtr becomes nullptr

This comment isn't needed.
Could you also add a test that has two references to original, moves one into
crossThreadCopy, and verifies that an isolated copy is indeed made?

> Tools/TestWebKitAPI/Tests/WTF/CrossThreadCopier.cpp:66
> +    // moved-out RefPtr becomes nullptr

Ditto, unnecessary comment.

More information about the webkit-reviews mailing list