[debug] Convert usages of FixedArray::length to ulength [v8/v8 : main]

0 views
Skip to first unread message

Arash Kazemi (Gerrit)

unread,
Feb 6, 2026, 9:40:18 AM (4 days ago) Feb 6
to Omer Katz, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Omer Katz

Arash Kazemi voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Omer Katz
Submit Requirements:
  • 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
Gerrit-Change-Number: 7547814
Gerrit-PatchSet: 4
Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-Attention: Omer Katz <omer...@chromium.org>
Gerrit-Comment-Date: Fri, 06 Feb 2026 14:40:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Omer Katz (Gerrit)

unread,
Feb 6, 2026, 3:01:21 PM (4 days ago) Feb 6
to Arash Kazemi, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Arash Kazemi

Omer Katz voted and added 1 comment

Votes added by Omer Katz

Code-Review+1

1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
Submit Requirements:
    • 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: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
    Gerrit-Change-Number: 7547814
    Gerrit-PatchSet: 4
    Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
    Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 20:01:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Omer Katz (Gerrit)

    unread,
    Feb 9, 2026, 3:50:34 PM (21 hours ago) Feb 9
    to Arash Kazemi, Jakob Linke, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Arash Kazemi and Jakob Linke

    Omer Katz added 1 comment

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Omer Katz . resolved

    still lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Arash Kazemi
    • Jakob Linke
    Submit Requirements:
      • 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: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
      Gerrit-Change-Number: 7547814
      Gerrit-PatchSet: 7
      Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
      Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
      Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
      Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
      Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
      Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
      Gerrit-Comment-Date: Mon, 09 Feb 2026 20:50:30 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Jakob Linke (Gerrit)

      unread,
      2:50 AM (10 hours ago) 2:50 AM
      to Arash Kazemi, Omer Katz, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
      Attention needed from Arash Kazemi

      Jakob Linke voted and added 3 comments

      Votes added by Jakob Linke

      Code-Review+1

      3 comments

      File src/debug/debug-interface.cc
      Line 276, Patchset 7 (Latest): uint32_t keys_len = keys->ulength().value();
      Jakob Linke . unresolved

      q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?

      Line 695, Patchset 7 (Latest): int lines_end_len = static_cast<int>(line_ends->ulength().value());
      Jakob Linke . unresolved

      Why not uint32_t here too? And addtl a `DCHECK_GT(lines_end_len, 0)` for the subtractions below.

      File src/debug/debug-wasm-objects.cc
      Line 436, Patchset 7 (Latest): return values->ulength().value() - 2;
      Jakob Linke . unresolved

      DCHECK_GE(.., 2)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Arash Kazemi
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
      Gerrit-Change-Number: 7547814
      Gerrit-PatchSet: 7
      Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
      Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
      Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
      Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
      Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
      Gerrit-Comment-Date: Tue, 10 Feb 2026 07:50:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Arash Kazemi (Gerrit)

      unread,
      4:06 AM (8 hours ago) 4:06 AM
      to Jakob Linke, Omer Katz, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
      Attention needed from Jakob Linke

      Arash Kazemi added 3 comments

      File src/debug/debug-interface.cc
      Line 276, Patchset 7: uint32_t keys_len = keys->ulength().value();
      Jakob Linke . unresolved

      q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?

      Arash Kazemi

      The idea would be to keep `SafeHeapObjectSize` (renamed to something more generic) at least until implicit casts warnings can be enabled on the codebase. This way all callsites have to be more explicit when handling lengths by calling `.value()`. Of course, you could also end up writing `int something = length().value()` but it should hopefully be less likely.

      Line 695, Patchset 7: int lines_end_len = static_cast<int>(line_ends->ulength().value());
      Jakob Linke . resolved

      Why not uint32_t here too? And addtl a `DCHECK_GT(lines_end_len, 0)` for the subtractions below.

      Arash Kazemi

      Done

      File src/debug/debug-wasm-objects.cc
      Line 436, Patchset 7: return values->ulength().value() - 2;
      Jakob Linke . resolved

      DCHECK_GE(.., 2)

      Arash Kazemi

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jakob Linke
      Submit Requirements:
        • 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: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
        Gerrit-Change-Number: 7547814
        Gerrit-PatchSet: 9
        Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
        Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
        Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
        Gerrit-Comment-Date: Tue, 10 Feb 2026 09:06:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Jakob Linke (Gerrit)

        unread,
        5:59 AM (7 hours ago) 5:59 AM
        to Arash Kazemi, Omer Katz, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
        Attention needed from Arash Kazemi

        Jakob Linke voted and added 3 comments

        Votes added by Jakob Linke

        Code-Review+1

        3 comments

        Patchset-level comments
        File-level comment, Patchset 9 (Latest):
        Jakob Linke . resolved

        Still lgtm, thanks.

        File src/debug/debug-interface.cc
        Line 276, Patchset 7: uint32_t keys_len = keys->ulength().value();
        Jakob Linke . resolved

        q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?

        Arash Kazemi

        The idea would be to keep `SafeHeapObjectSize` (renamed to something more generic) at least until implicit casts warnings can be enabled on the codebase. This way all callsites have to be more explicit when handling lengths by calling `.value()`. Of course, you could also end up writing `int something = length().value()` but it should hopefully be less likely.

        Jakob Linke

        I see.

        Of course, you could also end up writing int something = length().value() but it should hopefully be less likely.

        Yeah exactly; I hope we're going in the right direction here wrt preventing mistakes vs. readable/simple code. Personally I'd much rather work with plain uint32_t.

        Line 698, Patchset 9 (Latest): return Just(GetSmiValue(line_ends, lines_end_len - 1));
        Jakob Linke . unresolved

        nit: There's one more here.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arash Kazemi
        Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
          Gerrit-Change-Number: 7547814
          Gerrit-PatchSet: 9
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
          Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
          Gerrit-Comment-Date: Tue, 10 Feb 2026 10:59:00 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Arash Kazemi <ara...@chromium.org>
          Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Arash Kazemi (Gerrit)

          unread,
          6:51 AM (6 hours ago) 6:51 AM
          to Jakob Linke, Omer Katz, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
          Attention needed from Jakob Linke

          Arash Kazemi voted and added 1 comment

          Votes added by Arash Kazemi

          Commit-Queue+1

          1 comment

          File src/debug/debug-interface.cc
          Line 698, Patchset 9: return Just(GetSmiValue(line_ends, lines_end_len - 1));
          Jakob Linke . resolved

          nit: There's one more here.

          Arash Kazemi

          Done, thanks!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Jakob Linke
          Submit Requirements:
            • 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: v8/v8
            Gerrit-Branch: main
            Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
            Gerrit-Change-Number: 7547814
            Gerrit-PatchSet: 10
            Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
            Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
            Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
            Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
            Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
            Gerrit-Comment-Date: Tue, 10 Feb 2026 11:51:00 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Omer Katz (Gerrit)

            unread,
            8:05 AM (4 hours ago) 8:05 AM
            to Arash Kazemi, Jakob Linke, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
            Attention needed from Arash Kazemi and Jakob Linke

            Omer Katz voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Arash Kazemi
            • Jakob Linke
            Submit Requirements:
              • requirement 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: v8/v8
              Gerrit-Branch: main
              Gerrit-Change-Id: I8d70ac38a3c9d99e29361d907643f61d3843bdab
              Gerrit-Change-Number: 7547814
              Gerrit-PatchSet: 10
              Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
              Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
              Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
              Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
              Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
              Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
              Gerrit-Comment-Date: Tue, 10 Feb 2026 13:05:27 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages