Delete CrossThreadCopier [chromium/src : main]

0 views
Skip to first unread message

Daniel Cheng (Gerrit)

unread,
Nov 20, 2025, 6:31:40 PM (2 days ago) Nov 20
to Daniel Cheng, Michael Lippautz, Jeremy Roman, Andrey Kosyakov, Florin Malita, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
Attention needed from Andrey Kosyakov, Florin Malita, Jeremy Roman and Michael Lippautz

Daniel Cheng added 6 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Daniel Cheng . unresolved

@mlip...@chromium.org and @jbr...@chromium.org for the overall review.

tl;dr I really don't think the costs of `CrossThreadCopier` justify its existence anymore. It's true that Oilpan types are still thread-hostile, but the issue has always been transitive violations, which the current traits don't really do much for anyway.

I have toyed with the idea of having some marker for thread-hostile things, and then having the clang plugin derive thread-safety transitively and enforce it for things that care (like `CrossThreadBind...`)–basically, the Rust style of "compiler derives `Send` for you where it can" but I don't think figuring that out should be blocking for this cleanup either. Please let me know you feel differently.

@ca...@chromium.org, @fma...@chromium.org I left some implementation-specific questions below–PTAL at those if you can.

File third_party/blink/renderer/core/workers/worklet_module_responses_map.cc
Line 51, Patchset 5 (Latest): params->IsolatedCopy()));
Daniel Cheng . unresolved

If we don't call `IsolatedCopy()` here, it won't build.

Technically you can still do an unsafe thing here though if you call `std::move(*this)`...

File third_party/blink/renderer/modules/webcodecs/background_readback.cc
Line 68, Patchset 5 (Parent): : public CrossThreadCopierPassThrough<base::span<uint8_t>> {
Daniel Cheng . resolved

This is an example of a specialization that's not really defined in the correct place and could lead to ODR issues.

Actually even bindings spans is pretty dubious... but that's something I'm tackling separately.

File third_party/blink/renderer/platform/bindings/source_location.h
Line 36, Patchset 5 (Latest):// GarbageCollected heap but it doesn't actually have to.
Daniel Cheng . unresolved

@ca...@chromium.org, is this really load-bearing? I see this was made GCed in https://chromium-review.googlesource.com/c/chromium/src/+/6485451 but from my perspective it's only adding complexity.

File third_party/blink/renderer/platform/graphics/skia/skia_utils.h
Line 146, Patchset 5 (Parent): CHECK(bitmap.isImmutable() || bitmap.isNull())
Daniel Cheng . unresolved

@fma...@chromium.org, do we really need to keep these runtime checks?

(If this were code outside of Blink, we just wouldn't have these checks at all)

File third_party/blink/renderer/platform/wtf/cross_thread_copier_skia.h
Line 48, Patchset 5 (Parent): "sk_sp<T> can be passed across threads only if T is SkRefCnt.");
Daniel Cheng . unresolved

@fma...@chromium.org, is this `static_assert` really load-bearing? It seems "nice to have" but I'm not sure it's "keep hundreds of lines of C++ specializations nice to have".

Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
  • Florin Malita
  • Jeremy Roman
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id598e48b3a1b9f2f1e28f5458b94ee5995a8e48d
Gerrit-Change-Number: 6685109
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Hirokazu Honda <hi...@chromium.org>
Gerrit-CC: Hongchan Choi <hong...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-CC: Xida Chen <xida...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
Gerrit-Attention: Florin Malita <fma...@chromium.org>
Gerrit-Comment-Date: Thu, 20 Nov 2025 23:31:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrey Kosyakov (Gerrit)

unread,
Nov 20, 2025, 7:21:43 PM (2 days ago) Nov 20
to Daniel Cheng, Michael Lippautz, Jeremy Roman, Florin Malita, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
Attention needed from Daniel Cheng, Florin Malita, Jeremy Roman and Michael Lippautz

Andrey Kosyakov voted and added 11 comments

Votes added by Andrey Kosyakov

Code-Review+1

11 comments

Patchset-level comments
Andrey Kosyakov . resolved

bindings/ and inspector/ lgtm

File third_party/blink/renderer/core/css/css_syntax_definition.h
Line 56, Patchset 5 (Latest): CSSSyntaxDefinition IsolatedCopy() const;
Andrey Kosyakov . unresolved

Looks like you've just deleted the only call site, so this can go as well.

File third_party/blink/renderer/core/loader/cross_thread_resource_timing_info_copier.h
File-level comment, Patchset 5 (Parent):
Andrey Kosyakov . unresolved

Please nuke the entire file.

File third_party/blink/renderer/core/loader/cross_thread_resource_timing_info_copier.cc
File-level comment, Patchset 5 (Parent):
Andrey Kosyakov . unresolved

Please nuke the entire file.

File third_party/blink/renderer/core/workers/cross_thread_global_scope_creation_params_copier.h
File-level comment, Patchset 5 (Parent):
Andrey Kosyakov . unresolved

Nuke the entire file?

File third_party/blink/renderer/core/workers/cross_thread_global_scope_creation_params_copier.cc
File-level comment, Patchset 5 (Parent):
Andrey Kosyakov . unresolved

ditto.

File third_party/blink/renderer/core/workers/custom_event_message.h
Line 18, Patchset 5 (Latest): scoped_refptr<blink::SerializedScriptValue> message;
Andrey Kosyakov . unresolved

drive-by: looks like this may be destroyed on a thread different from its creation thread (both before and after this change), and `~SerializedScriptValue()` is not entirely thread safe, at least when it comes to [non-production code](https://source.chromium.org/chromium/chromium/src/+/main:v8/src/api/api.cc;l=12455;drc=db569cd7847d479358bd391a18b2c28393803333). The prod code looks thread-safe though, at least at a quick glance.

File third_party/blink/renderer/core/workers/worklet_module_responses_map.cc
Line 51, Patchset 5 (Latest): params->IsolatedCopy()));
Daniel Cheng . unresolved

If we don't call `IsolatedCopy()` here, it won't build.

Technically you can still do an unsafe thing here though if you call `std::move(*this)`...

Andrey Kosyakov

Looks like ModuleScriptCreationParams intentionally clears some fields though, so maybe we shouldn't get around it.

File third_party/blink/renderer/platform/bindings/cross_thread_source_location.h
Line 51, Patchset 5 (Latest): // TODO(dcheng): Unclear if this is even needed.
Andrey Kosyakov . unresolved

It's needed for as the underlying V8StackTrace::clone() is non-trivial (i.e. drops some non-thread safe fields).

File third_party/blink/renderer/platform/bindings/source_location.h
Line 36, Patchset 5 (Latest):// GarbageCollected heap but it doesn't actually have to.
Daniel Cheng . resolved

@ca...@chromium.org, is this really load-bearing? I see this was made GCed in https://chromium-review.googlesource.com/c/chromium/src/+/6485451 but from my perspective it's only adding complexity.

Andrey Kosyakov

The original plan was to start using some v8 types in SourceLocation, but for the time being further development went a slightly different path. That said, I think it may still have some merit. A SourceLocation being sent accross threads is a very infrequent case, whereas SourceLocation (proper) is rather performance-critical and we want it to be as fast as possible. Considering it's not uncommon to discard it, we primarily care for capturing source location to be fast, and from this point of view keeping v8 types and converting lazily might help.

File third_party/blink/renderer/platform/heap/cross_thread_handle_internal.h
Line 132, Patchset 5 (Parent):struct CrossThreadCopier<internal::BasicCrossThreadHandle<T, WeaknessPolicy>>
Andrey Kosyakov . unresolved

drive-by thought: do we have a way to accidentally prevent regular persistent handles from being posted across threads now?

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Florin Malita
  • Jeremy Roman
  • Michael Lippautz
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
      Gerrit-Attention: Florin Malita <fma...@chromium.org>
      Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Nov 2025 00:21:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Cheng (Gerrit)

      unread,
      Nov 20, 2025, 8:25:42 PM (2 days ago) Nov 20
      to Daniel Cheng, Kentaro Hara, Andrey Kosyakov, Michael Lippautz, Jeremy Roman, Florin Malita, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
      Attention needed from Andrey Kosyakov, Florin Malita, Jeremy Roman and Michael Lippautz

      Daniel Cheng added 8 comments

      File third_party/blink/renderer/core/loader/cross_thread_resource_timing_info_copier.h
      Andrey Kosyakov . resolved

      Please nuke the entire file.

      Daniel Cheng

      This is intentional, to avoid dealing with IWYU errors. Copied the TODO here.

      File third_party/blink/renderer/core/loader/cross_thread_resource_timing_info_copier.cc
      Andrey Kosyakov . resolved

      Please nuke the entire file.

      Daniel Cheng

      This one I missed though. Done now.

      File third_party/blink/renderer/core/workers/cross_thread_global_scope_creation_params_copier.h
      Andrey Kosyakov . resolved

      Nuke the entire file?

      Daniel Cheng

      Intentionally kept for now but copied the TODO here as well.

      File third_party/blink/renderer/core/workers/cross_thread_global_scope_creation_params_copier.cc
      Andrey Kosyakov . resolved

      ditto.

      Daniel Cheng

      Good call, done.

      File third_party/blink/renderer/core/workers/worklet_module_responses_map.cc
      Line 51, Patchset 5: params->IsolatedCopy()));
      Daniel Cheng . unresolved

      If we don't call `IsolatedCopy()` here, it won't build.

      Technically you can still do an unsafe thing here though if you call `std::move(*this)`...

      Andrey Kosyakov

      Looks like ModuleScriptCreationParams intentionally clears some fields though, so maybe we shouldn't get around it.

      Daniel Cheng

      Yes, sorry–to be clear, calling `std::move(*this)` would be a bug, and I am highlighting this as a thing that we would no longer be able to catch.

      File third_party/blink/renderer/platform/bindings/cross_thread_source_location.h
      Line 51, Patchset 5: // TODO(dcheng): Unclear if this is even needed.
      Andrey Kosyakov . unresolved

      It's needed for as the underlying V8StackTrace::clone() is non-trivial (i.e. drops some non-thread safe fields).

      Daniel Cheng

      I'm going to have to think about how to make this CL safe in light of this.

      File third_party/blink/renderer/platform/bindings/source_location.h
      Line 36, Patchset 5:// GarbageCollected heap but it doesn't actually have to.
      Daniel Cheng . resolved

      @ca...@chromium.org, is this really load-bearing? I see this was made GCed in https://chromium-review.googlesource.com/c/chromium/src/+/6485451 but from my perspective it's only adding complexity.

      Andrey Kosyakov

      The original plan was to start using some v8 types in SourceLocation, but for the time being further development went a slightly different path. That said, I think it may still have some merit. A SourceLocation being sent accross threads is a very infrequent case, whereas SourceLocation (proper) is rather performance-critical and we want it to be as fast as possible. Considering it's not uncommon to discard it, we primarily care for capturing source location to be fast, and from this point of view keeping v8 types and converting lazily might help.

      Daniel Cheng

      OK I'm willing to buy that argument. I just worry because it's currently easy to bind this unsafely. I've reverted the changes to this file.

      File third_party/blink/renderer/platform/heap/cross_thread_handle_internal.h
      Line 132, Patchset 5 (Parent):struct CrossThreadCopier<internal::BasicCrossThreadHandle<T, WeaknessPolicy>>
      Andrey Kosyakov . unresolved

      drive-by thought: do we have a way to accidentally prevent regular persistent handles from being posted across threads now?

      Daniel Cheng

      There is a static_assert in `CrossThreadBindOnce()` that theoretically should catch this.

      But it doesn't catch transitive violations, e.g. see https://chromium-review.googlesource.com/7167966

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrey Kosyakov
      • Florin Malita
      • Jeremy Roman
      • Michael Lippautz
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Id598e48b3a1b9f2f1e28f5458b94ee5995a8e48d
          Gerrit-Change-Number: 6685109
          Gerrit-PatchSet: 6
          Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
          Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
          Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
          Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
          Gerrit-CC: Hirokazu Honda <hi...@chromium.org>
          Gerrit-CC: Hongchan Choi <hong...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-CC: Stephen Chenney <sche...@chromium.org>
          Gerrit-CC: Xida Chen <xida...@chromium.org>
          Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
          Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
          Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
          Gerrit-Attention: Florin Malita <fma...@chromium.org>
          Gerrit-Comment-Date: Fri, 21 Nov 2025 01:25:31 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
          Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Florin Malita (Gerrit)

          unread,
          Nov 21, 2025, 10:43:00 AM (yesterday) Nov 21
          to Daniel Cheng, Kentaro Hara, Andrey Kosyakov, Michael Lippautz, Jeremy Roman, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
          Attention needed from Andrey Kosyakov, Daniel Cheng, Jeremy Roman and Michael Lippautz

          Florin Malita added 2 comments

          File third_party/blink/renderer/platform/graphics/skia/skia_utils.h
          Line 146, Patchset 5 (Parent): CHECK(bitmap.isImmutable() || bitmap.isNull())
          Daniel Cheng . unresolved

          @fma...@chromium.org, do we really need to keep these runtime checks?

          (If this were code outside of Blink, we just wouldn't have these checks at all)

          Florin Malita

          New code should use `SkImage`s instead, which are intrinsically immutable. Removing sgtm.

          File third_party/blink/renderer/platform/wtf/cross_thread_copier_skia.h
          Line 48, Patchset 5 (Parent): "sk_sp<T> can be passed across threads only if T is SkRefCnt.");
          Daniel Cheng . unresolved

          @fma...@chromium.org, is this `static_assert` really load-bearing? It seems "nice to have" but I'm not sure it's "keep hundreds of lines of C++ specializations nice to have".

          Florin Malita

          Agreed, I don't think it's worth keeping this machinery around just for an assert.

          (it also arbitrarily excludes `SkNVRefCnt`-derived types)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrey Kosyakov
          • Daniel Cheng
          • Jeremy Roman
          • Michael Lippautz
          Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
          Gerrit-Comment-Date: Fri, 21 Nov 2025 15:42:52 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Daniel Cheng (Gerrit)

          unread,
          Nov 21, 2025, 3:18:57 PM (yesterday) Nov 21
          to Daniel Cheng, Hiroki Nakagawa, Kentaro Hara, Andrey Kosyakov, Michael Lippautz, Jeremy Roman, Florin Malita, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, kinuko+ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
          Attention needed from Andrey Kosyakov, Jeremy Roman and Michael Lippautz

          Daniel Cheng added 3 comments

          File third_party/blink/renderer/platform/bindings/cross_thread_source_location.h
          Line 51, Patchset 5: // TODO(dcheng): Unclear if this is even needed.
          Andrey Kosyakov . resolved

          It's needed for as the underlying V8StackTrace::clone() is non-trivial (i.e. drops some non-thread safe fields).

          Daniel Cheng

          I'm going to have to think about how to make this CL safe in light of this.

          Daniel Cheng

          OK, the parent CL should address this. `CrossThreadSourceLocation` is now always inherently safe to move across threads.

          File third_party/blink/renderer/platform/graphics/skia/skia_utils.h
          Line 146, Patchset 5 (Parent): CHECK(bitmap.isImmutable() || bitmap.isNull())
          Daniel Cheng . resolved

          @fma...@chromium.org, do we really need to keep these runtime checks?

          (If this were code outside of Blink, we just wouldn't have these checks at all)

          Florin Malita

          New code should use `SkImage`s instead, which are intrinsically immutable. Removing sgtm.

          Daniel Cheng

          Acknowledged

          File third_party/blink/renderer/platform/wtf/cross_thread_copier_skia.h
          Line 48, Patchset 5 (Parent): "sk_sp<T> can be passed across threads only if T is SkRefCnt.");
          Daniel Cheng . resolved

          @fma...@chromium.org, is this `static_assert` really load-bearing? It seems "nice to have" but I'm not sure it's "keep hundreds of lines of C++ specializations nice to have".

          Florin Malita

          Agreed, I don't think it's worth keeping this machinery around just for an assert.

          (it also arbitrarily excludes `SkNVRefCnt`-derived types)

          Daniel Cheng

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrey Kosyakov
          • Jeremy Roman
          • Michael Lippautz
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Id598e48b3a1b9f2f1e28f5458b94ee5995a8e48d
          Gerrit-Change-Number: 6685109
          Gerrit-PatchSet: 8
          Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
          Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
          Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
          Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
          Gerrit-CC: Hirokazu Honda <hi...@chromium.org>
          Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-CC: Hongchan Choi <hong...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-CC: Stephen Chenney <sche...@chromium.org>
          Gerrit-CC: Xida Chen <xida...@chromium.org>
          Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
          Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
          Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
          Gerrit-Comment-Date: Fri, 21 Nov 2025 20:18:47 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
          Comment-In-Reply-To: Florin Malita <fma...@chromium.org>
          Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Daniel Cheng (Gerrit)

          unread,
          Nov 21, 2025, 3:25:43 PM (yesterday) Nov 21
          to Daniel Cheng, Hiroki Nakagawa, Kentaro Hara, Andrey Kosyakov, Michael Lippautz, Jeremy Roman, Florin Malita, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, kinuko+ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
          Attention needed from Andrey Kosyakov, Jeremy Roman and Michael Lippautz

          Daniel Cheng added 1 comment

          File third_party/blink/renderer/core/css/css_syntax_definition.h
          Line 56, Patchset 5: CSSSyntaxDefinition IsolatedCopy() const;
          Andrey Kosyakov . resolved

          Looks like you've just deleted the only call site, so this can go as well.

          Daniel Cheng

          Oops, fixed this too now.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrey Kosyakov
          • Jeremy Roman
          • Michael Lippautz
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Id598e48b3a1b9f2f1e28f5458b94ee5995a8e48d
          Gerrit-Change-Number: 6685109
          Gerrit-PatchSet: 9
          Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
          Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
          Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
          Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
          Gerrit-CC: Hirokazu Honda <hi...@chromium.org>
          Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-CC: Hongchan Choi <hong...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-CC: Stephen Chenney <sche...@chromium.org>
          Gerrit-CC: Xida Chen <xida...@chromium.org>
          Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
          Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
          Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
          Gerrit-Comment-Date: Fri, 21 Nov 2025 20:25:32 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Andrey Kosyakov (Gerrit)

          unread,
          Nov 21, 2025, 5:01:16 PM (yesterday) Nov 21
          to Daniel Cheng, Hiroki Nakagawa, Kentaro Hara, Michael Lippautz, Jeremy Roman, Florin Malita, srirama chandra sekhar, Xida Chen, devtools...@chromium.org, Hongchan Choi, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Dirk Schulze, Hirokazu Honda, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, kinuko+ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, blink-re...@chromium.org, eric.c...@apple.com, ipc-securi...@chromium.org, blink-revi...@chromium.org, erickun...@chromium.org, jophba...@chromium.org, mfoltz+wa...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-reviews-p...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, emircan+watch...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, kinuko...@chromium.org, kinuko...@chromium.org, kouhe...@chromium.org, kouhei...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, mcasas+med...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
          Attention needed from Daniel Cheng, Jeremy Roman and Michael Lippautz

          Andrey Kosyakov voted and added 3 comments

          Votes added by Andrey Kosyakov

          Code-Review+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 9 (Latest):
          Andrey Kosyakov . resolved

          re-stamping

          File third_party/blink/renderer/platform/graphics/skia/skia_utils.h
          Line 138, Patchset 9 (Latest):// TODO(dcheng): This one might have some value, though it's not entirely clear
          Andrey Kosyakov . unresolved

          Remove this following the removal of class it was referring to?

          File third_party/blink/renderer/platform/heap/cross_thread_handle_internal.h
          Line 132, Patchset 5 (Parent):struct CrossThreadCopier<internal::BasicCrossThreadHandle<T, WeaknessPolicy>>
          Andrey Kosyakov . resolved

          drive-by thought: do we have a way to accidentally prevent regular persistent handles from being posted across threads now?

          Daniel Cheng

          There is a static_assert in `CrossThreadBindOnce()` that theoretically should catch this.

          But it doesn't catch transitive violations, e.g. see https://chromium-review.googlesource.com/7167966

          Andrey Kosyakov

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Daniel Cheng
          • Jeremy Roman
          • Michael Lippautz
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
            Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
            Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
            Gerrit-Comment-Date: Fri, 21 Nov 2025 22:00:55 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
            Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages