base:: Replace most usages of AsAtomicPtr with std::atomic_ref [v8/v8 : main]

0 views
Skip to first unread message

Michael Lippautz (Gerrit)

unread,
Dec 4, 2025, 1:42:31 PM (4 days ago) Dec 4
to Omer Katz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Omer Katz

Michael Lippautz voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Omer Katz
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: I7c90e0bf313229dcfa5c242c8adff177a3b05986
Gerrit-Change-Number: 7229186
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Omer Katz <omer...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Dec 2025 18:42:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Omer Katz (Gerrit)

unread,
Dec 4, 2025, 2:45:47 PM (4 days ago) Dec 4
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Omer Katz voted and added 2 comments

Votes added by Omer Katz

Code-Review+1

2 comments

Patchset-level comments
Commit Message
Line 7, Patchset 6 (Latest):base:: Replace most usages of AsAtomicPtr with std::atomic_ref
Omer Katz . unresolved

Why not all?
I think you could also include the instances in `v8/src/heap/cppgc/heap-page.h` in this CL.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement 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: I7c90e0bf313229dcfa5c242c8adff177a3b05986
Gerrit-Change-Number: 7229186
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Dec 2025 19:45:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Dec 4, 2025, 3:53:10 PM (4 days ago) Dec 4
to Omer Katz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Omer Katz

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Auto-Submit+1
Commit-Queue+1

1 comment

Commit Message
Line 7, Patchset 6:base:: Replace most usages of AsAtomicPtr with std::atomic_ref
Omer Katz . resolved

Why not all?
I think you could also include the instances in `v8/src/heap/cppgc/heap-page.h` in this CL.

Michael Lippautz

Added heap-page.h.

Why not all: The remaining uses are non-trivial:

  • JS atomic: would require assignment operator which is deleted on the ref.
  • Counters: Does expose the atomic ptr to other dependencies and I have not full parsed the necessary APIs for that on atomic_ref yet.
Open in Gerrit

Related details

Attention is currently required from:
  • Omer Katz
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: I7c90e0bf313229dcfa5c242c8adff177a3b05986
Gerrit-Change-Number: 7229186
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Omer Katz <omer...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Dec 2025 20:53:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Omer Katz <omer...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Omer Katz (Gerrit)

unread,
Dec 4, 2025, 3:55:35 PM (4 days ago) Dec 4
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Omer Katz voted and added 1 comment

Votes added by Omer Katz

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
Omer Katz . resolved

lgtm

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I7c90e0bf313229dcfa5c242c8adff177a3b05986
Gerrit-Change-Number: 7229186
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Dec 2025 20:55:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Dec 4, 2025, 4:56:31 PM (4 days ago) Dec 4
to Michael Lippautz, Omer Katz, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

V8 LUCI CQ submitted the change

Change information

Commit message:
base:: Replace most usages of AsAtomicPtr with std::atomic_ref

std::atomic_ref is the better primitive and allows avoiding the UB
cast to atomic.
Change-Id: I7c90e0bf313229dcfa5c242c8adff177a3b05986
Reviewed-by: Omer Katz <omer...@chromium.org>
Commit-Queue: Michael Lippautz <mlip...@chromium.org>
Auto-Submit: Michael Lippautz <mlip...@chromium.org>
Commit-Queue: Omer Katz <omer...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#104127}
Files:
  • M src/base/atomic-utils.h
  • M src/heap/cppgc/heap-object-header.h
  • M src/heap/cppgc/heap-page.h
  • M src/heap/cppgc/object-start-bitmap.h
  • M src/heap/sweeper.cc
  • M test/unittests/heap/cppgc/heap-object-header-unittest.cc
Change size: M
Delta: 6 files changed, 47 insertions(+), 40 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Omer Katz
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I7c90e0bf313229dcfa5c242c8adff177a3b05986
Gerrit-Change-Number: 7229186
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages