spanify media/cdm/library_cdm/clear_key_cdm.cc [chromium/src : main]

0 views
Skip to first unread message

Danilo Françoso Tedeschi (Gerrit)

unread,
Dec 18, 2025, 12:54:39 PM (3 days ago) Dec 18
to AyeAye, Stephen Nusko, Code Review Nudger, Chromium LUCI CQ, chromium...@chromium.org, cblume...@chromium.org, devtools...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Feras Aldahlawi and Stephen Nusko

Danilo Françoso Tedeschi added 4 comments

File media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc
Line 288, Patchset 5: const int kBytesToRead = 10;
Stephen Nusko . resolved

nit: this can remain `constexpr`?

Danilo Françoso Tedeschi

Done

Line 290, Patchset 5: std::optional<size_t> bytes_read = file.Read(0, buffer);
Stephen Nusko . resolved

nit: you can keep the `const` from before.

Danilo Françoso Tedeschi

Done

Line 414, Patchset 5: // SAFETY: These are defined from a vector here:
// https://source.chromium.org/chromium/chromium/src/+/main:media/cdm/cdm_adapter.cc;l=384;drc=8bd3d24cc3bdbffe564eeeca112a6744e6766b17
base::span<const uint8_t> init_data_span =
UNSAFE_BUFFERS(base::span(init_data, init_data_size));
Stephen Nusko . resolved

If we move this after the early out I think we could also just make this a vector copy, and std::move it in.

Danilo Françoso Tedeschi

Done

Line 477, Patchset 5: // SAFETY: `response` and `response_size` must be in conformance.
base::span<const uint8_t> response_span =
UNSAFE_BUFFERS(base::span(response, response_size));
Stephen Nusko . resolved

should we just keep this as the vector here?

and then `std::move(response_copy)` into the function? no safer then before.

Danilo Françoso Tedeschi

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Feras Aldahlawi
  • Stephen Nusko
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: If6c1a97a2ed9cf2cfe04f7873a47821cb561d397
Gerrit-Change-Number: 7212677
Gerrit-PatchSet: 6
Gerrit-Owner: Danilo Françoso Tedeschi <da...@google.com>
Gerrit-Reviewer: Danilo Françoso Tedeschi <da...@google.com>
Gerrit-Reviewer: Feras Aldahlawi <f...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
Gerrit-Attention: Feras Aldahlawi <f...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Dec 2025 17:54:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen Nusko (Gerrit)

unread,
Dec 18, 2025, 10:10:00 PM (3 days ago) Dec 18
to Danilo Françoso Tedeschi, AyeAye, Code Review Nudger, Chromium LUCI CQ, chromium...@chromium.org, cblume...@chromium.org, devtools...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Danilo Françoso Tedeschi and Feras Aldahlawi

Stephen Nusko voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Danilo Françoso Tedeschi
  • Feras Aldahlawi
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement 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: If6c1a97a2ed9cf2cfe04f7873a47821cb561d397
    Gerrit-Change-Number: 7212677
    Gerrit-PatchSet: 7
    Gerrit-Owner: Danilo Françoso Tedeschi <da...@google.com>
    Gerrit-Reviewer: Danilo Françoso Tedeschi <da...@google.com>
    Gerrit-Reviewer: Feras Aldahlawi <f...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Danilo Françoso Tedeschi <da...@google.com>
    Gerrit-Attention: Feras Aldahlawi <f...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 03:09:23 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Feras Aldahlawi (Gerrit)

    unread,
    Dec 18, 2025, 11:00:51 PM (3 days ago) Dec 18
    to Danilo Françoso Tedeschi, Stephen Nusko, AyeAye, Code Review Nudger, Chromium LUCI CQ, chromium...@chromium.org, cblume...@chromium.org, devtools...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
    Attention needed from Danilo Françoso Tedeschi

    Feras Aldahlawi voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Danilo Françoso Tedeschi
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: If6c1a97a2ed9cf2cfe04f7873a47821cb561d397
      Gerrit-Change-Number: 7212677
      Gerrit-PatchSet: 7
      Gerrit-Owner: Danilo Françoso Tedeschi <da...@google.com>
      Gerrit-Reviewer: Danilo Françoso Tedeschi <da...@google.com>
      Gerrit-Reviewer: Feras Aldahlawi <f...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Danilo Françoso Tedeschi <da...@google.com>
      Gerrit-Comment-Date: Fri, 19 Dec 2025 04:00:39 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Xiaohan Wang (Gerrit)

      unread,
      Dec 19, 2025, 5:53:49 PM (2 days ago) Dec 19
      to Danilo Françoso Tedeschi, Stephen Nusko, AyeAye, Code Review Nudger, Chromium LUCI CQ, chromium...@chromium.org, cblume...@chromium.org, devtools...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
      Attention needed from Danilo Françoso Tedeschi

      Xiaohan Wang voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Danilo Françoso Tedeschi
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: If6c1a97a2ed9cf2cfe04f7873a47821cb561d397
      Gerrit-Change-Number: 7212677
      Gerrit-PatchSet: 7
      Gerrit-Owner: Danilo Françoso Tedeschi <da...@google.com>
      Gerrit-Reviewer: Danilo Françoso Tedeschi <da...@google.com>
      Gerrit-Reviewer: Feras Aldahlawi <f...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Danilo Françoso Tedeschi <da...@google.com>
      Gerrit-Comment-Date: Fri, 19 Dec 2025 22:53:35 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages