CrossThreadCopier: do we still need it?

9 views
Skip to first unread message

Daniel Cheng

unread,
Jun 6, 2025, 4:24:35 PMJun 6
to platform-architecture-dev, Dale Curtis
Now that String (and AtomicString and KURL) are thread-safe, do we still need CrossThreadCopier? Many implementations are simply "pass through" now. Even more problematically, it seems to be one of those things that's prone to ODR violations when people are just trying to get things to compile, e.g. third_party/blink/renderer/modules/webcodecs/background_readback.cc defines a specialization for "base::span<uint8_t>" (which is already questionable to begin with) instead of defining it somewhere more central.

There are a few specializations that appear somewhat load-bearing, such as CrossThreadCOpier<SkBitmap>, but they only check invariants and don't do any actual copying–this is something we could certainly preserve.

Daniel
Reply all
Reply to author
Forward
0 new messages