Use UnwrappingCrossThreadHandle in ImageCaptureFrameGrabber [chromium/src : main]

0 views
Skip to first unread message

Daniel Cheng (Gerrit)

unread,
Nov 18, 2025, 11:13:01 AM (4 days ago) Nov 18
to Daniel Cheng, Michael Lippautz, Reilly Grant, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@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, erickun...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, jophba...@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, mfoltz+wa...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
Attention needed from Michael Lippautz and Reilly Grant

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
  • Reilly Grant
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • 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: Icba0ebf829e6dfaa094f2f08862b79a838a2f362
Gerrit-Change-Number: 7167966
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Reilly Grant <rei...@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-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Reilly Grant <rei...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Nov 2025 16:12:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Reilly Grant (Gerrit)

unread,
Nov 19, 2025, 1:20:23 AM (4 days ago) Nov 19
to Daniel Cheng, Reilly Grant, Michael Lippautz, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@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, erickun...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, jophba...@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, mfoltz+wa...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
Attention needed from Daniel Cheng and Michael Lippautz

Reilly Grant voted and added 1 comment

Votes added by Reilly Grant

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Reilly Grant . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Michael Lippautz
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Wed, 19 Nov 2025 06:20:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    Nov 19, 2025, 3:57:54 AM (4 days ago) Nov 19
    to Daniel Cheng, Reilly Grant, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@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, erickun...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, jophba...@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, mfoltz+wa...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com
    Attention needed from Daniel Cheng

    Michael Lippautz voted and added 1 comment

    Votes added by Michael Lippautz

    Code-Review+1

    1 comment

    Patchset-level comments
    Michael Lippautz . resolved

    lgtm, thanks

    IIUC that's actually what the initial use case of `CrossThreadPersistent` was (but was broadened much more) and why we introduced the `CrossThreadHandle`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Wed, 19 Nov 2025 08:57:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Nov 19, 2025, 11:29:59 PM (3 days ago) Nov 19
    to Daniel Cheng, Michael Lippautz, Reilly Grant, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@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, erickun...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, jophba...@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, mfoltz+wa...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com

    Daniel Cheng voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    Gerrit-Comment-Date: Thu, 20 Nov 2025 04:29:47 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Nov 20, 2025, 12:32:38 AM (3 days ago) Nov 20
    to Daniel Cheng, Michael Lippautz, Reilly Grant, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Nate Chapin, Raphael Kubo da Costa, Stephen Chenney, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@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, erickun...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gavinp...@chromium.org, hiroshig...@chromium.org, horo+...@chromium.org, jophba...@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, mfoltz+wa...@chromium.org, oilpan-rev...@chromium.org, shimazu...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    Use UnwrappingCrossThreadHandle in ImageCaptureFrameGrabber

    While this code appears to work, Persistents are not safe to pass across
    threads. Rewrite this to use UnwrappingCrossThreadHandle instead.

    Additional fixes and cleanups:
    - Make ScopedPromiseResolver an inner class. There is already another
    `blink::ScopedPromiseResolver` that is not templated that would
    conflict with it if both definitions were ever visible in the same
    translation unit.
    - Remove unnecessary callbacks to remove indirections and simplify the
    code. Callback trampolines are not free, and this helper is used in
    exactly one place.
    - Related: return an image by value rather than by callback, so the
    compiler can warn if a path forgets to return an image.
    Bug: 460743390
    Change-Id: Icba0ebf829e6dfaa094f2f08862b79a838a2f362
    Reviewed-by: Reilly Grant <rei...@chromium.org>
    Reviewed-by: Michael Lippautz <mlip...@chromium.org>
    Commit-Queue: Daniel Cheng <dch...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1547631}
    Files:
    • M third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.cc
    • M third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.h
    • M third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h
    Change size: M
    Delta: 3 files changed, 95 insertions(+), 144 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Reilly Grant, +1 by Michael Lippautz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Icba0ebf829e6dfaa094f2f08862b79a838a2f362
    Gerrit-Change-Number: 7167966
    Gerrit-PatchSet: 2
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages