Replace some String::Format() usages with StrCat() in platform/ [chromium/src : main]

0 views
Skip to first unread message

Kent Tamura (Gerrit)

unread,
Apr 23, 2026, 4:23:31 AM (4 days ago) Apr 23
to Kent Tamura, Fredrik Söderquist, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Kentaro Hara, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, blink-revie...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, drott+bl...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, tommyw+w...@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: I3622e2b4187be3bb079c87b7229ef37da8fbee8e
Gerrit-Change-Number: 7788296
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-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Hongchan Choi <hong...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Thu, 23 Apr 2026 08:23:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Fredrik Söderquist (Gerrit)

unread,
Apr 23, 2026, 4:37:52 AM (4 days ago) Apr 23
to Kent Tamura, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Kentaro Hara, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, blink-revie...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, drott+bl...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, tommyw+w...@chromium.org
Attention needed from Kent Tamura

Fredrik Söderquist voted and added 2 comments

Votes added by Fredrik Söderquist

Code-Review+1

2 comments

Patchset-level comments
Fredrik Söderquist . resolved

I've found that using `String::Number()` like this, because it doesn't appear to be a win from a binary footprint PoV.

File third_party/blink/renderer/platform/fonts/font_variant_east_asian.cc
Line 47, Patchset 3 (Latest): ", ruby=", Ruby() ? "true" : "false"});
Fredrik Söderquist . resolved
Maybe it would be worthwhile to use `String::Boolean()` for cases like this?
```suggestion
", ruby=", String::Boolean(Ruby())});
```
(But maybe `String::Boolean()` would be better off returning a `StringView`...)
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: I3622e2b4187be3bb079c87b7229ef37da8fbee8e
    Gerrit-Change-Number: 7788296
    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-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Hongchan Choi <hong...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Kent Tamura <tk...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Apr 2026 08:37:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Kent Tamura (Gerrit)

    unread,
    Apr 23, 2026, 9:27:45 PM (3 days ago) Apr 23
    to Kent Tamura, Fredrik Söderquist, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Kentaro Hara, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, blink-revie...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, drott+bl...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, tommyw+w...@chromium.org

    Kent Tamura voted and added 2 comments

    Votes added by Kent Tamura

    Auto-Submit+1
    Commit-Queue+2

    2 comments

    Patchset-level comments
    Fredrik Söderquist . resolved

    I've found that using `String::Number()` like this, because it doesn't appear to be a win from a binary footprint PoV.

    Kent Tamura

    Yes, the size of code using String::Format()` is pretty small. I guess it's difficult to produce smaller code with modern ways.

    File third_party/blink/renderer/platform/fonts/font_variant_east_asian.cc
    Line 47, Patchset 3: ", ruby=", Ruby() ? "true" : "false"});
    Fredrik Söderquist . resolved
    Maybe it would be worthwhile to use `String::Boolean()` for cases like this?
    ```suggestion
    ", ruby=", String::Boolean(Ruby())});
    ```
    (But maybe `String::Boolean()` would be better off returning a `StringView`...)
    Kent Tamura

    Done.

    Open in Gerrit

    Related details

    Attention set is empty
    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: I3622e2b4187be3bb079c87b7229ef37da8fbee8e
    Gerrit-Change-Number: 7788296
    Gerrit-PatchSet: 4
    Gerrit-Owner: Kent Tamura <tk...@chromium.org>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Hongchan Choi <hong...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Apr 2026 01:27:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Fredrik Söderquist <f...@opera.com>
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 23, 2026, 9:30:27 PM (3 days ago) Apr 23
    to Kent Tamura, Fredrik Söderquist, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Dirk Schulze, Kentaro Hara, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, blink-revie...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, drott+bl...@chromium.org, feature-me...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, tommyw+w...@chromium.org

    Chromium LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    3 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: third_party/blink/renderer/platform/fonts/font_variant_east_asian.cc
    Insertions: 1, Deletions: 1.

    The diff is too large to show. Please review the diff.
    ```

    Change information

    Commit message:
    Replace some String::Format() usages with StrCat() in platform/

    This CL resolves some UNSAFE_TODOs, and should have no behavior
    changes.
    Bug: 451652367
    Change-Id: I3622e2b4187be3bb079c87b7229ef37da8fbee8e
    Auto-Submit: Kent Tamura <tk...@chromium.org>
    Reviewed-by: Fredrik Söderquist <f...@opera.com>
    Commit-Queue: Kent Tamura <tk...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1619903}
    Files:
    • M third_party/blink/renderer/platform/audio/audio_destination.cc
    • M third_party/blink/renderer/platform/bindings/exception_messages.cc
    • M third_party/blink/renderer/platform/fonts/font_description.cc
    • M third_party/blink/renderer/platform/fonts/font_size_adjust.cc
    • M third_party/blink/renderer/platform/fonts/font_variant_east_asian.cc
    • M third_party/blink/renderer/platform/geometry/physical_size.cc
    • M third_party/blink/renderer/platform/graphics/paint/display_item_list.cc
    • M third_party/blink/renderer/platform/mediastream/media_stream_component_impl.cc
    • M third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl_unittest.cc
    • M third_party/blink/renderer/platform/text/date_time_format_test.cc
    Change size: M
    Delta: 10 files changed, 48 insertions(+), 56 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: I3622e2b4187be3bb079c87b7229ef37da8fbee8e
    Gerrit-Change-Number: 7788296
    Gerrit-PatchSet: 5
    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