WTF: Resolve 64-bit truncation issues in string classes [chromium/src : main]

1 view
Skip to first unread message

Kent Tamura (Gerrit)

unread,
May 25, 2026, 3:30:30 AM (10 days ago) May 25
to Kent Tamura, Fredrik Söderquist, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Fredrik Söderquist

Kent Tamura voted and added 1 comment

Votes added by Kent Tamura

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Kent Tamura . resolved

fs@, would you review this please?

Open in Gerrit

Related details

Attention is currently required from:
  • Fredrik Söderquist
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: I136c35810937a48fd5daa870251c8e16233a9861
Gerrit-Change-Number: 7867151
Gerrit-PatchSet: 3
Gerrit-Owner: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Mon, 25 May 2026 07:30:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Fredrik Söderquist (Gerrit)

unread,
May 25, 2026, 4:35:41 AM (10 days ago) May 25
to Kent Tamura, chrom...@appspot.gserviceaccount.com, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Kent Tamura

Fredrik Söderquist voted

Code-Review+1
Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Kent Tamura
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: I136c35810937a48fd5daa870251c8e16233a9861
    Gerrit-Change-Number: 7867151
    Gerrit-PatchSet: 3
    Gerrit-Owner: Kent Tamura <tk...@chromium.org>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    Gerrit-Attention: Kent Tamura <tk...@chromium.org>
    Gerrit-Comment-Date: Mon, 25 May 2026 08:35:32 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    May 25, 2026, 4:54:34 AM (10 days ago) May 25
    to Kent Tamura, Fredrik Söderquist, chrom...@appspot.gserviceaccount.com, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    WTF: Resolve 64-bit truncation issues in string classes

    This CL adds explicit base::checked_cast calls where 64-bit
    size_t values are narrowed to 32-bit, preventing silent truncation.

    To simplify common patterns, this CL introduces CheckedDistance(),
    which wraps std::distance with a base::checked_cast<wtf_size_t>.

    This is preparation for enabling the -Wshorten-64-to-32 compiler flag.
    Bug: 514751964
    Change-Id: I136c35810937a48fd5daa870251c8e16233a9861
    Auto-Submit: Kent Tamura <tk...@chromium.org>
    Reviewed-by: Fredrik Söderquist <f...@opera.com>
    Commit-Queue: Fredrik Söderquist <f...@opera.com>
    Cr-Commit-Position: refs/heads/main@{#1635638}
    Files:
    • M third_party/blink/renderer/platform/wtf/text/string_impl.cc
    • M third_party/blink/renderer/platform/wtf/text/string_impl.h
    • M third_party/blink/renderer/platform/wtf/text/string_internal.h
    • M third_party/blink/renderer/platform/wtf/text/wtf_string.cc
    • M third_party/blink/renderer/platform/wtf/wtf_size_t.h
    Change size: S
    Delta: 5 files changed, 31 insertions(+), 14 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Fredrik Söderquist
    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: I136c35810937a48fd5daa870251c8e16233a9861
    Gerrit-Change-Number: 7867151
    Gerrit-PatchSet: 4
    Gerrit-Owner: Kent Tamura <tk...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages