base: Convert RAW_PTR_EXCLUSION to raw_ptr<T, kUnprotectedInRelease> [chromium/src : main]

2 views
Skip to first unread message

Keishi Hattori (Gerrit)

unread,
Jun 10, 2026, 1:50:55 AMJun 10
to Stephen Nusko, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, fdoray...@chromium.org, gab+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Stephen Nusko

Keishi Hattori added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Keishi Hattori . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • 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: I8da9a182f13dd115a93647e5f412ddd7e1e13f36
Gerrit-Change-Number: 7901851
Gerrit-PatchSet: 5
Gerrit-Owner: Keishi Hattori <kei...@chromium.org>
Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 05:50:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen Nusko (Gerrit)

unread,
Jun 10, 2026, 3:28:36 AMJun 10
to Keishi Hattori, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, fdoray...@chromium.org, gab+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Keishi Hattori

Stephen Nusko voted and added 2 comments

Votes added by Stephen Nusko

Code-Review+1

2 comments

File base/task/common/task_annotator.h
Line 221, Patchset 5 (Latest): [[maybe_unused]] RAW_PTR_EXCLUSION PendingTask& pending_task_;
Stephen Nusko . unresolved

Should this be a `raw_ref<PendingTask, kUnprotectedInRelease>`?

Perhaps update the comment as well?

File base/task/sequence_manager/work_queue.h
Line 178, Patchset 5 (Latest): // RAW_PTR_EXCLUSION: TaskQueueImpl is in the raw_ptr-unsupported types list
// (perf-sensitive; see raw_ptr.h). Performance reasons (speedometer3).
RAW_PTR_EXCLUSION TaskQueueImpl* const task_queue_ = nullptr; // NOT OWNED.
Stephen Nusko . unresolved

This is not switched because it is perf-sensitive? Even in debug? Might want to make the comment even clearer that this was excluded. Or should this also be kUnprotectedInRelease?

Open in Gerrit

Related details

Attention is currently required from:
  • Keishi Hattori
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8da9a182f13dd115a93647e5f412ddd7e1e13f36
    Gerrit-Change-Number: 7901851
    Gerrit-PatchSet: 5
    Gerrit-Owner: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
    Gerrit-Comment-Date: Wed, 10 Jun 2026 07:28:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Stephen Nusko (Gerrit)

    unread,
    Jun 17, 2026, 1:29:29 AMJun 17
    to Keishi Hattori, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, fdoray...@chromium.org, gab+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Keishi Hattori

    Stephen Nusko voted and added 2 comments

    Votes added by Stephen Nusko

    Code-Review+1

    2 comments

    File base/task/common/task_annotator.h
    Line 221, Patchset 5: [[maybe_unused]] RAW_PTR_EXCLUSION PendingTask& pending_task_;
    Stephen Nusko . resolved

    Should this be a `raw_ref<PendingTask, kUnprotectedInRelease>`?

    Perhaps update the comment as well?

    Stephen Nusko

    Acknowledged

    File base/task/sequence_manager/work_queue.h
    Line 178, Patchset 5: // RAW_PTR_EXCLUSION: TaskQueueImpl is in the raw_ptr-unsupported types list

    // (perf-sensitive; see raw_ptr.h). Performance reasons (speedometer3).
    RAW_PTR_EXCLUSION TaskQueueImpl* const task_queue_ = nullptr; // NOT OWNED.
    Stephen Nusko . unresolved

    This is not switched because it is perf-sensitive? Even in debug? Might want to make the comment even clearer that this was excluded. Or should this also be kUnprotectedInRelease?

    Stephen Nusko

    I don't think I understand this comment (it likely is fine and just my knowledge gap), what does "it is excluded globally" mean? the bug crbug.com/335556942, doesn't say anything explicit here about this one so I wasn't able to read up.

    Is it such that `raw_ptr_traits::IsSupportedType<TaskQueueImpl>::value == false`?

    Ah I see it is listed [here](https://source.chromium.org/chromium/chromium/src/+/main:base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h;l=233;drc=6ce6f0f91493b5c3a3ce713a2ef454db5deb45a3), is this what you mean by "is excluded globally"?

    Why do we just not remove it from that list and leave it as kUnprotectedInRelease? Is it too costly? Why not a regular RAW_PTR_EXCLUSION?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keishi Hattori
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8da9a182f13dd115a93647e5f412ddd7e1e13f36
    Gerrit-Change-Number: 7901851
    Gerrit-PatchSet: 7
    Gerrit-Owner: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
    Gerrit-Comment-Date: Wed, 17 Jun 2026 05:29:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keishi Hattori (Gerrit)

    unread,
    Jul 2, 2026, 10:19:03 PM (17 hours ago) Jul 2
    to Daniel Cheng, Stephen Nusko, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, fdoray...@chromium.org, gab+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Daniel Cheng and Stephen Nusko

    Keishi Hattori added 3 comments

    Keishi Hattori . resolved

    PTAL

    File base/task/common/task_annotator.h
    Line 221, Patchset 5: [[maybe_unused]] RAW_PTR_EXCLUSION PendingTask& pending_task_;
    Stephen Nusko . resolved

    Should this be a `raw_ref<PendingTask, kUnprotectedInRelease>`?

    Perhaps update the comment as well?

    Keishi Hattori

    Done

    File base/task/sequence_manager/work_queue.h
    Line 178, Patchset 5: // RAW_PTR_EXCLUSION: TaskQueueImpl is in the raw_ptr-unsupported types list
    // (perf-sensitive; see raw_ptr.h). Performance reasons (speedometer3).
    RAW_PTR_EXCLUSION TaskQueueImpl* const task_queue_ = nullptr; // NOT OWNED.
    Stephen Nusko . unresolved

    This is not switched because it is perf-sensitive? Even in debug? Might want to make the comment even clearer that this was excluded. Or should this also be kUnprotectedInRelease?

    Keishi Hattori

    TaskQUeueImpl was excluded as a type by IsSupportedType in raw_ptr.h. I think it is because it was used in Bind. I will need to get to this in a follow up.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    • Stephen Nusko
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8da9a182f13dd115a93647e5f412ddd7e1e13f36
    Gerrit-Change-Number: 7901851
    Gerrit-PatchSet: 8
    Gerrit-Owner: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 02:18:32 +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,
    Jul 2, 2026, 10:20:16 PM (17 hours ago) Jul 2
    to Keishi Hattori, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, fdoray...@chromium.org, gab+...@chromium.org, jessemcke...@google.com, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Daniel Cheng and Keishi Hattori

    Stephen Nusko voted and added 1 comment

    Votes added by Stephen Nusko

    Code-Review+1

    1 comment

    File base/task/sequence_manager/work_queue.h
    Line 178, Patchset 5: // RAW_PTR_EXCLUSION: TaskQueueImpl is in the raw_ptr-unsupported types list
    // (perf-sensitive; see raw_ptr.h). Performance reasons (speedometer3).
    RAW_PTR_EXCLUSION TaskQueueImpl* const task_queue_ = nullptr; // NOT OWNED.
    Stephen Nusko . resolved

    This is not switched because it is perf-sensitive? Even in debug? Might want to make the comment even clearer that this was excluded. Or should this also be kUnprotectedInRelease?

    Keishi Hattori

    TaskQUeueImpl was excluded as a type by IsSupportedType in raw_ptr.h. I think it is because it was used in Bind. I will need to get to this in a follow up.

    Stephen Nusko

    Sounds reasonable. Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    • Keishi Hattori
    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: I8da9a182f13dd115a93647e5f412ddd7e1e13f36
      Gerrit-Change-Number: 7901851
      Gerrit-PatchSet: 8
      Gerrit-Owner: Keishi Hattori <kei...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
      Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
      Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
      Gerrit-Comment-Date: Fri, 03 Jul 2026 02:19:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
      Comment-In-Reply-To: Keishi Hattori <kei...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages