Making span.h available within partition_alloc. [chromium/src : main]

0 views
Skip to first unread message

Arthur Sonzogni (Gerrit)

unread,
Jan 27, 2026, 9:49:09 AM (11 days ago) Jan 27
to Sergio Solano, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Sergio Solano

Arthur Sonzogni added 13 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Arthur Sonzogni . resolved

Thanks Sergio!

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h
Line 13, Patchset 2 (Latest):#include "partition_alloc/partition_alloc_base/containers/span.h"
Arthur Sonzogni . unresolved

Is this needed?

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/base_export.h
Line 1, Patchset 2 (Latest):// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_BASE_EXPORT_H_
#define BASE_BASE_EXPORT_H_

#if defined(COMPONENT_BUILD)
#if defined(WIN32)

#if defined(BASE_IMPLEMENTATION)
#define BASE_EXPORT __declspec(dllexport)
#else
#define BASE_EXPORT __declspec(dllimport)
#endif // defined(BASE_IMPLEMENTATION)

#else // defined(WIN32)
#define BASE_EXPORT __attribute__((visibility("default")))
#endif

#else // defined(COMPONENT_BUILD)
#define BASE_EXPORT
#endif

#endif // BASE_BASE_EXPORT_H_
Arthur Sonzogni . unresolved

We should reuse:
```
PA_COMPONENT_EXPORT(PARTITION_ALLOC)
```
and #include #include "partition_alloc/partition_alloc_base/component_export.h"

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/checked_iterators.h
Line 24, Patchset 2 (Latest):namespace base {
Arthur Sonzogni . unresolved

This should be `partition_alloc::internal::base`

Line 18, Patchset 2 (Latest):#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/containers/span_forward_internal.h"
#include "base/memory/raw_ptr_exclusion.h"
Arthur Sonzogni . unresolved

We shouldn't depend on "base".

we can use:

  • `partition_alloc/partition_alloc_base/check.h`
  • `span_forward_internal.h` -> To be added.
  • `partition_alloc/pointers/raw_ptr_exclusion.h`
  • `partition_alloc/build_config.h`
File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/span.h
Line 28, Patchset 2 (Latest):#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/containers/checked_iterators.h"
#include "base/containers/span_forward_internal.h"
#include "base/numerics/integral_constant_like.h"
#include "base/numerics/safe_conversions.h"
#include "base/types/to_address.h"
Arthur Sonzogni . unresolved

Ditto: we can depend on "base". We can only depend on "partition_alloc", so we need to find alternatives to those files.

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/dcheck_is_on.h
Line 1, Patchset 2 (Latest):// Copyright 2020 The Chromium Authors
Arthur Sonzogni . unresolved

This already exist as:
base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h

and `PA_CHECK` macro

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/location.h
Line 1, Patchset 2 (Latest):// Copyright 2012 The Chromium Authors
Arthur Sonzogni . unresolved

Is this file needed somewhere? If not, we can revert adding it.

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/macros/if.h
Line 1, Patchset 2 (Latest):// Copyright 2023 The Chromium Authors
Arthur Sonzogni . unresolved

I believe this file isn't necessary, right?

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/macros/is_empty.h
Line 1, Patchset 2 (Latest):// Copyright 2023 The Chromium Authors
Arthur Sonzogni . unresolved

I believe this file isn't necessary, right?

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/raw_ptr_exclusion.h
Line 1, Patchset 2 (Latest):// Copyright 2023 The Chromium Authors
Arthur Sonzogni . unresolved

No need to create this file, because it is already:
"partition_alloc/pointers/raw_ptr_exclusion.h"

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/not_fatal_until.h
Line 1, Patchset 2 (Latest):// Copyright 2023 The Chromium Authors
Arthur Sonzogni . unresolved

I don't believe this file is used, so we can get rid of it?

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/trace_event/base_tracing_forward.h
Line 1, Patchset 2 (Latest):// Copyright 2021 The Chromium Authors
Arthur Sonzogni . unresolved

If we remove `Location`, then this file isn't used anywhere, so it can be removed?

Open in Gerrit

Related details

Attention is currently required from:
  • Sergio Solano
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I214b046ab46ab59053b03e8ed7a473a0b238b906
Gerrit-Change-Number: 7517264
Gerrit-PatchSet: 2
Gerrit-Owner: Sergio Solano <sergio...@google.com>
Gerrit-CC: Arthur Sonzogni <arthurs...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Sergio Solano <sergio...@google.com>
Gerrit-Comment-Date: Tue, 27 Jan 2026 14:48:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sergio Solano (Gerrit)

unread,
Jan 28, 2026, 3:51:01 PM (10 days ago) Jan 28
to Arthur Sonzogni, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Arthur Sonzogni

Sergio Solano added 12 comments

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h
Line 13, Patchset 2:#include "partition_alloc/partition_alloc_base/containers/span.h"
Arthur Sonzogni . resolved

Is this needed?

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/base_export.h
Line 1, Patchset 2:// Copyright 2012 The Chromium Authors

// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_BASE_EXPORT_H_
#define BASE_BASE_EXPORT_H_

#if defined(COMPONENT_BUILD)
#if defined(WIN32)

#if defined(BASE_IMPLEMENTATION)
#define BASE_EXPORT __declspec(dllexport)
#else
#define BASE_EXPORT __declspec(dllimport)
#endif // defined(BASE_IMPLEMENTATION)

#else // defined(WIN32)
#define BASE_EXPORT __attribute__((visibility("default")))
#endif

#else // defined(COMPONENT_BUILD)
#define BASE_EXPORT
#endif

#endif // BASE_BASE_EXPORT_H_
Arthur Sonzogni . resolved

We should reuse:
```
PA_COMPONENT_EXPORT(PARTITION_ALLOC)
```
and #include #include "partition_alloc/partition_alloc_base/component_export.h"

Sergio Solano

I'm not sure if this is what you mean.

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/checked_iterators.h
Line 24, Patchset 2:namespace base {
Arthur Sonzogni . resolved

This should be `partition_alloc::internal::base`

Sergio Solano

Done

Line 18, Patchset 2:#include "base/check.h"

#include "base/compiler_specific.h"
#include "base/containers/span_forward_internal.h"
#include "base/memory/raw_ptr_exclusion.h"
Arthur Sonzogni . resolved

We shouldn't depend on "base".

we can use:

  • `partition_alloc/partition_alloc_base/check.h`
  • `span_forward_internal.h` -> To be added.
  • `partition_alloc/pointers/raw_ptr_exclusion.h`
  • `partition_alloc/build_config.h`
Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/span.h
Line 28, Patchset 2:#include "base/check.h"

#include "base/compiler_specific.h"
#include "base/containers/checked_iterators.h"
#include "base/containers/span_forward_internal.h"
#include "base/numerics/integral_constant_like.h"
#include "base/numerics/safe_conversions.h"
#include "base/types/to_address.h"
Arthur Sonzogni . resolved

Ditto: we can depend on "base". We can only depend on "partition_alloc", so we need to find alternatives to those files.

Sergio Solano

Agree, I was just in a hurry to share the CL so that i could ask you about the -Wgcc-compat warning.

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/dcheck_is_on.h
Line 1, Patchset 2:// Copyright 2020 The Chromium Authors
Arthur Sonzogni . resolved

This already exist as:
base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h

and `PA_CHECK` macro

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/location.h
Line 1, Patchset 2:// Copyright 2012 The Chromium Authors
Arthur Sonzogni . resolved

Is this file needed somewhere? If not, we can revert adding it.

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/macros/if.h
Line 1, Patchset 2:// Copyright 2023 The Chromium Authors
Arthur Sonzogni . resolved

I believe this file isn't necessary, right?

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/macros/is_empty.h
Line 1, Patchset 2:// Copyright 2023 The Chromium Authors
Arthur Sonzogni . resolved

I believe this file isn't necessary, right?

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/raw_ptr_exclusion.h
Line 1, Patchset 2:// Copyright 2023 The Chromium Authors
Arthur Sonzogni . resolved

No need to create this file, because it is already:
"partition_alloc/pointers/raw_ptr_exclusion.h"

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/not_fatal_until.h
Line 1, Patchset 2:// Copyright 2023 The Chromium Authors
Arthur Sonzogni . resolved

I don't believe this file is used, so we can get rid of it?

Sergio Solano

Done

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/trace_event/base_tracing_forward.h
Line 1, Patchset 2:// Copyright 2021 The Chromium Authors
Arthur Sonzogni . resolved

If we remove `Location`, then this file isn't used anywhere, so it can be removed?

Sergio Solano

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Arthur Sonzogni
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: I214b046ab46ab59053b03e8ed7a473a0b238b906
    Gerrit-Change-Number: 7517264
    Gerrit-PatchSet: 5
    Gerrit-Owner: Sergio Solano <sergio...@google.com>
    Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Comment-Date: Wed, 28 Jan 2026 20:50:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Arthur Sonzogni <arthurs...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Arthur Sonzogni (Gerrit)

    unread,
    Jan 29, 2026, 8:53:33 AM (9 days ago) Jan 29
    to Sergio Solano, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Sergio Solano

    Arthur Sonzogni added 4 comments

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/checked_iterators.h
    Line 128, Patchset 6 (Latest): CHECK(current_ != start_);
    Arthur Sonzogni . unresolved

    `CHECK` => `PA_CHECK`

    This is because `CHECK` is from chromium, and `PA_CHECK` from partition_alloc.

    Line 91, Patchset 6 (Latest): DCHECK(other.start_ <= other.current_);
    Arthur Sonzogni . unresolved

    `DCHECK` => `PA_DCHECK`

    This is because `DCHECK` is from chromium, and `PA_DCHECK` from partition_alloc.

    Line 22, Patchset 6 (Latest):#include "partition_alloc/pointers/raw_ptr_exclusion.h"
    Arthur Sonzogni . unresolved

    We can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`.

    This is not required, as the clang pluging doesn't enforce `raw_ptr`.
    See:
    https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/raw_ptr_plugin/RawPtrManualPathsToIgnore.cpp;l=29

    So maybe you can remove this include and the `RAW_PTR_EXCLUSION`?

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/macros/concat.h
    Line 1, Patchset 6 (Latest):// Copyright 2023 The Chromium Authors

    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.

    #ifndef BASE_MACROS_CONCAT_H_
    #define BASE_MACROS_CONCAT_H_

    // A macro that expands to the concatenation of its arguments. If the arguments
    // are themselves macros, they are first expanded (due to the indirection
    // through a second macro). This can be used to construct tokens.
    #define BASE_CONCAT(a, b) BASE_INTERNAL_CONCAT(a, b)

    // Implementation details: do not use directly.
    #define BASE_INTERNAL_CONCAT(a, b) a##b

    #endif // BASE_MACROS_CONCAT_H_
    Arthur Sonzogni . unresolved

    I don't see any usage. Maybe this should be removed?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Sergio Solano
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I214b046ab46ab59053b03e8ed7a473a0b238b906
      Gerrit-Change-Number: 7517264
      Gerrit-PatchSet: 6
      Gerrit-Owner: Sergio Solano <sergio...@google.com>
      Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
      Gerrit-Reviewer: Sergio Solano <sergio...@google.com>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Sergio Solano <sergio...@google.com>
      Gerrit-Comment-Date: Thu, 29 Jan 2026 13:53:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Arthur Sonzogni (Gerrit)

      unread,
      Jan 29, 2026, 8:54:14 AM (9 days ago) Jan 29
      to Sergio Solano, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from Sergio Solano

      Arthur Sonzogni added 1 comment

      Patchset-level comments
      File-level comment, Patchset 6 (Latest):
      Arthur Sonzogni . resolved

      I think we are very close!

      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sergio Solano (Gerrit)

      unread,
      Jan 29, 2026, 1:06:16 PM (9 days ago) Jan 29
      to Chromium LUCI CQ, Arthur Sonzogni, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from Arthur Sonzogni

      Sergio Solano added 4 comments

      File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/checked_iterators.h
      Line 128, Patchset 6: CHECK(current_ != start_);
      Arthur Sonzogni . resolved

      `CHECK` => `PA_CHECK`

      This is because `CHECK` is from chromium, and `PA_CHECK` from partition_alloc.

      Sergio Solano

      Done

      Line 91, Patchset 6: DCHECK(other.start_ <= other.current_);
      Arthur Sonzogni . resolved

      `DCHECK` => `PA_DCHECK`

      This is because `DCHECK` is from chromium, and `PA_DCHECK` from partition_alloc.

      Sergio Solano

      I missed updating this file. Done now.

      Line 22, Patchset 6:#include "partition_alloc/pointers/raw_ptr_exclusion.h"
      Arthur Sonzogni . resolved

      We can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`.

      This is not required, as the clang pluging doesn't enforce `raw_ptr`.
      See:
      https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/raw_ptr_plugin/RawPtrManualPathsToIgnore.cpp;l=29

      So maybe you can remove this include and the `RAW_PTR_EXCLUSION`?

      Sergio Solano

      Is there a way i sould have known this? It's not clear to me:

      1. why we can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`. Does it has to do with cyclic dependencies?

      2. how did you know the clang pluging doesn't enforce `raw_ptr`? By experience or is there some checks I'm missing?

      File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/macros/concat.h
      Line 1, Patchset 6:// Copyright 2023 The Chromium Authors

      // Use of this source code is governed by a BSD-style license that can be
      // found in the LICENSE file.

      #ifndef BASE_MACROS_CONCAT_H_
      #define BASE_MACROS_CONCAT_H_

      // A macro that expands to the concatenation of its arguments. If the arguments
      // are themselves macros, they are first expanded (due to the indirection
      // through a second macro). This can be used to construct tokens.
      #define BASE_CONCAT(a, b) BASE_INTERNAL_CONCAT(a, b)

      // Implementation details: do not use directly.
      #define BASE_INTERNAL_CONCAT(a, b) a##b

      #endif // BASE_MACROS_CONCAT_H_
      Arthur Sonzogni . resolved

      I don't see any usage. Maybe this should be removed?

      Sergio Solano

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Arthur Sonzogni
      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: I214b046ab46ab59053b03e8ed7a473a0b238b906
        Gerrit-Change-Number: 7517264
        Gerrit-PatchSet: 8
        Gerrit-Owner: Sergio Solano <sergio...@google.com>
        Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Sergio Solano <sergio...@google.com>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Comment-Date: Thu, 29 Jan 2026 18:06:07 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Arthur Sonzogni <arthurs...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Arthur Sonzogni (Gerrit)

        unread,
        Jan 30, 2026, 5:15:05 AM (8 days ago) Jan 30
        to Sergio Solano, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Sergio Solano

        Arthur Sonzogni added 1 comment

        File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/span.h
        Line 708, Patchset 8 (Latest): // Implicit conversion to fixed-extent `std::span<>`. (The fixed-extent
        // `std::span` range constructor is explicit.)
        // NOLINTNEXTLINE(google-explicit-constructor)
        operator std::span<element_type, extent>() const {
        return std::span<element_type, extent>(*this);
        }
        // NOLINTNEXTLINE(google-explicit-constructor)
        operator std::span<const element_type, extent>() const
        requires(!std::is_const_v<element_type>)
        {
        return std::span<const element_type, extent>(*this);
        }
        Arthur Sonzogni . unresolved

        I don't think we will need to support `std::span` conversion for now. Maybe this can be removed?

        If we ever need it, we can include it later and update the PRESUBMIT.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Sergio Solano
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I214b046ab46ab59053b03e8ed7a473a0b238b906
          Gerrit-Change-Number: 7517264
          Gerrit-PatchSet: 8
          Gerrit-Owner: Sergio Solano <sergio...@google.com>
          Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
          Gerrit-Reviewer: Sergio Solano <sergio...@google.com>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Attention: Sergio Solano <sergio...@google.com>
          Gerrit-Comment-Date: Fri, 30 Jan 2026 10:14:52 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Arthur Sonzogni (Gerrit)

          unread,
          Jan 30, 2026, 5:38:00 AM (8 days ago) Jan 30
          to Sergio Solano, Chromium LUCI CQ, Arthur Sonzogni, chromium...@chromium.org, Kentaro Hara, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
          Attention needed from Sergio Solano

          Arthur Sonzogni added 1 comment

          File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/checked_iterators.h
          Line 22, Patchset 6:#include "partition_alloc/pointers/raw_ptr_exclusion.h"
          Arthur Sonzogni . unresolved

          We can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`.

          This is not required, as the clang pluging doesn't enforce `raw_ptr`.
          See:
          https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/raw_ptr_plugin/RawPtrManualPathsToIgnore.cpp;l=29

          So maybe you can remove this include and the `RAW_PTR_EXCLUSION`?

          Sergio Solano

          Is there a way i sould have known this? It's not clear to me:

          1. why we can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`. Does it has to do with cyclic dependencies?

          2. how did you know the clang pluging doesn't enforce `raw_ptr`? By experience or is there some checks I'm missing?

          Arthur Sonzogni

          I don't think you could have known. I also spent 10 minutes to think about that before suggesting this solution.

          This file is part of "raw_ptr" target. The CQ failure says it isn't a dependency of "allocator_base".

          We see "raw_ptr" depends on "allocator_base":
          ```
          gn path ./out/linux-rel base/allocator/partition_allocator/src/partition_alloc:raw_ptr base/allocator/partition_allocator/src/partition_alloc:allocator_base
          ```
          ```
          //base/allocator/partition_allocator/src/partition_alloc:raw_ptr --[public]-->
          //base/allocator/partition_allocator/src/partition_alloc:partition_alloc --[public]-->
          //base/allocator/partition_allocator/src/partition_alloc:allocator_base
          ```

          So, it would be a circular dependency for "allocator_base" to depend on "raw_ptr".

          We could have added a subtarget for just this file. It would be a dependency of both "raw_ptr" and "allocator_base", but this is a bit ugly.


          Technically, "allocator_base" is used to implement "raw_ptr", so we shouldn't really depend on `raw_ptr_exclusion". So I checked how other code in `allocator_base` deal with it. Then I guessed the clang plugin must have an exclusion for avoid this [issue](https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/raw_ptr_plugin/RawPtrManualPathsToIgnore.cpp;l=29)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Sergio Solano
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I214b046ab46ab59053b03e8ed7a473a0b238b906
          Gerrit-Change-Number: 7517264
          Gerrit-PatchSet: 8
          Gerrit-Owner: Sergio Solano <sergio...@google.com>
          Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
          Gerrit-Reviewer: Sergio Solano <sergio...@google.com>
          Gerrit-CC: Arthur Sonzogni <arthurs...@google.com>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Attention: Sergio Solano <sergio...@google.com>
          Gerrit-Comment-Date: Fri, 30 Jan 2026 10:37:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sergio Solano <sergio...@google.com>
          Comment-In-Reply-To: Arthur Sonzogni <arthurs...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sergio Solano (Gerrit)

          unread,
          Feb 6, 2026, 12:57:49 PM (24 hours ago) Feb 6
          to AyeAye, Arthur Sonzogni, Chromium LUCI CQ, Arthur Sonzogni, chromium...@chromium.org, Kentaro Hara, jshin...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
          Attention needed from Arthur Sonzogni, Arthur Sonzogni and Sergio Solano

          Sergio Solano voted and added 3 comments

          Votes added by Sergio Solano

          Commit-Queue+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 8:
          Sergio Solano . resolved

          I think I'm even closer to making it. What happens with ERROR A banned pattern was used. `absl::Span and std::span are banned.`? Is there a way to shutdown the error?

          File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/checked_iterators.h
          Line 22, Patchset 6:#include "partition_alloc/pointers/raw_ptr_exclusion.h"
          Arthur Sonzogni . resolved

          We can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`.

          This is not required, as the clang pluging doesn't enforce `raw_ptr`.
          See:
          https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/raw_ptr_plugin/RawPtrManualPathsToIgnore.cpp;l=29

          So maybe you can remove this include and the `RAW_PTR_EXCLUSION`?

          Sergio Solano

          Is there a way i sould have known this? It's not clear to me:

          1. why we can't depend on `raw_ptr_exclusion.h` from `partition_alloc_base`. Does it has to do with cyclic dependencies?

          2. how did you know the clang pluging doesn't enforce `raw_ptr`? By experience or is there some checks I'm missing?

          Arthur Sonzogni

          I don't think you could have known. I also spent 10 minutes to think about that before suggesting this solution.

          This file is part of "raw_ptr" target. The CQ failure says it isn't a dependency of "allocator_base".

          We see "raw_ptr" depends on "allocator_base":
          ```
          gn path ./out/linux-rel base/allocator/partition_allocator/src/partition_alloc:raw_ptr base/allocator/partition_allocator/src/partition_alloc:allocator_base
          ```
          ```
          //base/allocator/partition_allocator/src/partition_alloc:raw_ptr --[public]-->
          //base/allocator/partition_allocator/src/partition_alloc:partition_alloc --[public]-->
          //base/allocator/partition_allocator/src/partition_alloc:allocator_base
          ```

          So, it would be a circular dependency for "allocator_base" to depend on "raw_ptr".

          We could have added a subtarget for just this file. It would be a dependency of both "raw_ptr" and "allocator_base", but this is a bit ugly.


          Technically, "allocator_base" is used to implement "raw_ptr", so we shouldn't really depend on `raw_ptr_exclusion". So I checked how other code in `allocator_base` deal with it. Then I guessed the clang plugin must have an exclusion for avoid this [issue](https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/raw_ptr_plugin/RawPtrManualPathsToIgnore.cpp;l=29)

          Sergio Solano

          Done

          File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/span.h
          Line 708, Patchset 8: // Implicit conversion to fixed-extent `std::span<>`. (The fixed-extent

          // `std::span` range constructor is explicit.)
          // NOLINTNEXTLINE(google-explicit-constructor)
          operator std::span<element_type, extent>() const {
          return std::span<element_type, extent>(*this);
          }
          // NOLINTNEXTLINE(google-explicit-constructor)
          operator std::span<const element_type, extent>() const
          requires(!std::is_const_v<element_type>)
          {
          return std::span<const element_type, extent>(*this);
          }
          Arthur Sonzogni . resolved

          I don't think we will need to support `std::span` conversion for now. Maybe this can be removed?

          If we ever need it, we can include it later and update the PRESUBMIT.

          Sergio Solano

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Arthur Sonzogni
          • Arthur Sonzogni
          • Sergio Solano
          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: I214b046ab46ab59053b03e8ed7a473a0b238b906
            Gerrit-Change-Number: 7517264
            Gerrit-PatchSet: 15
            Gerrit-Owner: Sergio Solano <sergio...@google.com>
            Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
            Gerrit-Reviewer: Sergio Solano <sergio...@google.com>
            Gerrit-CC: Arthur Sonzogni <arthurs...@google.com>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
            Gerrit-Attention: Sergio Solano <sergio...@google.com>
            Gerrit-Attention: Arthur Sonzogni <arthurs...@google.com>
            Gerrit-Comment-Date: Fri, 06 Feb 2026 17:57:38 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Sergio Solano <sergio...@google.com>
            Comment-In-Reply-To: Arthur Sonzogni <arthurs...@chromium.org>
            Comment-In-Reply-To: Arthur Sonzogni <arthurs...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages