[EXPLORATION] Avoid unowned pickles in IPC code [chromium/src : main]

0 views
Skip to first unread message

Mikel Astiz (Gerrit)

unread,
Jan 26, 2026, 8:56:25 AM (7 days ago) Jan 26
to Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Daniel Cheng

Mikel Astiz voted and added 2 comments

Votes added by Mikel Astiz

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Mikel Astiz . unresolved

dch...@chromium.org WDYT or did I get too excited with modernizing base::Pickle?

File base/pickle.h
Line 35, Patchset 12 (Latest): virtual ~PickleIterator();
Mikel Astiz . unresolved

I would be in favor of avoiding this virtual destructor to keep the size of PickleIterator small.

To do so, `ipc::MessageIterator` would need to fork the entire PickleIterator API with inline function bodies that invoke PickleIterator's corresponding APIs, using a member field `PickleIterator` instead of inheritance.

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
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: I06eb96f9aab66d4a26adffe8bd88a24d4d5cf3f5
Gerrit-Change-Number: 7510955
Gerrit-PatchSet: 12
Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Mon, 26 Jan 2026 13:56:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jan 26, 2026, 12:10:21 PM (7 days ago) Jan 26
to Mikel Astiz, Tom Sepez, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Mikel Astiz and Tom Sepez

Daniel Cheng added 1 comment

Patchset-level comments
Daniel Cheng . unresolved

So legacy IPC is essentially dead, but we have some bits that still remain due to `[Native]` messages.

I think it would probably be better to try to get rid of it (https://issues.chromium.org/issues/393179188) and see how much API surface is left.

The allowlist is at https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/tools/bindings/checks/mojom_attributes_check.py;l=98;drc=e7bae9e99c6257ba4d08e7dc0dcf27eb5f2573e6 and there's almost certainly some low-hanging fruit on there.

Open in Gerrit

Related details

Attention is currently required from:
  • Mikel Astiz
  • Tom Sepez
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: I06eb96f9aab66d4a26adffe8bd88a24d4d5cf3f5
Gerrit-Change-Number: 7510955
Gerrit-PatchSet: 12
Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Mikel Astiz <mas...@chromium.org>
Gerrit-Comment-Date: Mon, 26 Jan 2026 17:10:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Tom Sepez (Gerrit)

unread,
Jan 26, 2026, 1:09:05 PM (7 days ago) Jan 26
to Mikel Astiz, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Mikel Astiz

Tom Sepez added 1 comment

Patchset-level comments
Tom Sepez . resolved

I've wanted this for quite a while, however, the IPC usage was something I tried to remove some months ago, but left in-place until [native] serialization could be removed. So like Daniel says, let's not muck with the IPC code.

Fixing this in all other places seems reasonable. Maybe make the non-owning constructors private and "friend" in the IPC callers?

Open in Gerrit

Related details

Attention is currently required from:
  • Mikel Astiz
Gerrit-Attention: Mikel Astiz <mas...@chromium.org>
Gerrit-Comment-Date: Mon, 26 Jan 2026 18:08:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mikel Astiz (Gerrit)

unread,
Jan 26, 2026, 1:21:51 PM (7 days ago) Jan 26
to Tom Sepez, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Daniel Cheng and Tom Sepez

Mikel Astiz added 3 comments

Patchset-level comments
Mikel Astiz . resolved

Thanks!

Tom Sepez . resolved

I've wanted this for quite a while, however, the IPC usage was something I tried to remove some months ago, but left in-place until [native] serialization could be removed. So like Daniel says, let's not muck with the IPC code.

Fixing this in all other places seems reasonable. Maybe make the non-owning constructors private and "friend" in the IPC callers?

Mikel Astiz

Ack. Let's continue the conversation in the other thread. The private approach you propose seems reasonable (or a better variant IMO would make it protected, and let ipc::Message declare friendship), but personally I would rather delete it altogether.

Daniel Cheng . unresolved

So legacy IPC is essentially dead, but we have some bits that still remain due to `[Native]` messages.

I think it would probably be better to try to get rid of it (https://issues.chromium.org/issues/393179188) and see how much API surface is left.

The allowlist is at https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/tools/bindings/checks/mojom_attributes_check.py;l=98;drc=e7bae9e99c6257ba4d08e7dc0dcf27eb5f2573e6 and there's almost certainly some low-hanging fruit on there.

Mikel Astiz

I fear the bug linked above could be another rabbit hole and I feel like unblocking the removal of `Pickle::WithUnownedBuffer` (which I find very error-prone) asap would be a very good thing; do you agree?

If legacy IPC is semi-dead, does anything speak against submitting this patch?

I don't particularly see downsides but I'm seeking guidance, and in particular there's the question of whether the new API introduced in `PickleIterator` (with IPC just being a first user) is good. See the next patch for trivially migrating most callers, and there's there one or two more calling sites that require a bit more attention and a dedicated patch.

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Tom Sepez
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Mon, 26 Jan 2026 18:21:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tom Sepez <tse...@chromium.org>
Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jan 26, 2026, 8:48:49 PM (6 days ago) Jan 26
to Mikel Astiz, Tom Sepez, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Mikel Astiz and Tom Sepez

Daniel Cheng added 1 comment

Patchset-level comments
Daniel Cheng . unresolved

So legacy IPC is essentially dead, but we have some bits that still remain due to `[Native]` messages.

I think it would probably be better to try to get rid of it (https://issues.chromium.org/issues/393179188) and see how much API surface is left.

The allowlist is at https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/tools/bindings/checks/mojom_attributes_check.py;l=98;drc=e7bae9e99c6257ba4d08e7dc0dcf27eb5f2573e6 and there's almost certainly some low-hanging fruit on there.

Mikel Astiz

I fear the bug linked above could be another rabbit hole and I feel like unblocking the removal of `Pickle::WithUnownedBuffer` (which I find very error-prone) asap would be a very good thing; do you agree?

If legacy IPC is semi-dead, does anything speak against submitting this patch?

I don't particularly see downsides but I'm seeking guidance, and in particular there's the question of whether the new API introduced in `PickleIterator` (with IPC just being a first user) is good. See the next patch for trivially migrating most callers, and there's there one or two more calling sites that require a bit more attention and a dedicated patch.

Daniel Cheng

Yes, I don't really want to take a CL that changes a thousand lines given how little use of WithUnownedBuffer there is, especially if it means we're adding a virtual or duplicating functions. It's not likely there will be more uses introduced anyway.

Open in Gerrit

Related details

Attention is currently required from:
  • Mikel Astiz
  • Tom Sepez
Gerrit-Attention: Mikel Astiz <mas...@chromium.org>
Gerrit-Comment-Date: Tue, 27 Jan 2026 01:48:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mikel Astiz <mas...@chromium.org>
Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mikel Astiz (Gerrit)

unread,
Jan 27, 2026, 6:36:21 AM (6 days ago) Jan 27
to Tom Sepez, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Daniel Cheng and Tom Sepez

Mikel Astiz added 2 comments

Patchset-level comments
Mikel Astiz . resolved

Thanks for thinking this through.

Daniel Cheng . unresolved

So legacy IPC is essentially dead, but we have some bits that still remain due to `[Native]` messages.

I think it would probably be better to try to get rid of it (https://issues.chromium.org/issues/393179188) and see how much API surface is left.

The allowlist is at https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/tools/bindings/checks/mojom_attributes_check.py;l=98;drc=e7bae9e99c6257ba4d08e7dc0dcf27eb5f2573e6 and there's almost certainly some low-hanging fruit on there.

Mikel Astiz

I fear the bug linked above could be another rabbit hole and I feel like unblocking the removal of `Pickle::WithUnownedBuffer` (which I find very error-prone) asap would be a very good thing; do you agree?

If legacy IPC is semi-dead, does anything speak against submitting this patch?

I don't particularly see downsides but I'm seeking guidance, and in particular there's the question of whether the new API introduced in `PickleIterator` (with IPC just being a first user) is good. See the next patch for trivially migrating most callers, and there's there one or two more calling sites that require a bit more attention and a dedicated patch.

Daniel Cheng

Yes, I don't really want to take a CL that changes a thousand lines given how little use of WithUnownedBuffer there is, especially if it means we're adding a virtual or duplicating functions. It's not likely there will be more uses introduced anyway.

Mikel Astiz

To make sure I understand your stance: is your point about IPC code specifically (which IIUC you would rather not refactor even mechanically in light of upcoming code cleanups) or more generally about the idea of deprecating `Pickle::WithUnownedBuffer` in favor of introducing `PickleIterator::WithUnownedData()`?

If the latter, I will sadly abandon this patch series (and stick to what I started with, which is spanifying the public interface). The main downside IMO is that Pickle's implementation cannot be simplified to adopt a standard container (e.g. HeapBuffer, vector or InlinedVector) and hopefully avoid unsafe buffer annotations.

If your point is about IPC code specifically, I will consider the middle ground that Tom suggested (other thread in this CL), which is to allowlist IPC for this WithUnownedBuffer, but migrate other callers to PickleIterator. In this scenario, Pickle's internal simplifications would need to wait until legacy IPC (or at least attachment support) is cleaned up. That said, before embracing this blockage, I would make another attempt with this patch because there's another variant that may address the concerns you have listed so far (except for the mechanical changes being large).

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Tom Sepez
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Tue, 27 Jan 2026 11:36:04 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jan 27, 2026, 11:48:48 AM (6 days ago) Jan 27
to Mikel Astiz, Tom Sepez, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Mikel Astiz and Tom Sepez

Daniel Cheng added 1 comment

Patchset-level comments
Daniel Cheng . unresolved

So legacy IPC is essentially dead, but we have some bits that still remain due to `[Native]` messages.

I think it would probably be better to try to get rid of it (https://issues.chromium.org/issues/393179188) and see how much API surface is left.

The allowlist is at https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/tools/bindings/checks/mojom_attributes_check.py;l=98;drc=e7bae9e99c6257ba4d08e7dc0dcf27eb5f2573e6 and there's almost certainly some low-hanging fruit on there.

Mikel Astiz

I fear the bug linked above could be another rabbit hole and I feel like unblocking the removal of `Pickle::WithUnownedBuffer` (which I find very error-prone) asap would be a very good thing; do you agree?

If legacy IPC is semi-dead, does anything speak against submitting this patch?

I don't particularly see downsides but I'm seeking guidance, and in particular there's the question of whether the new API introduced in `PickleIterator` (with IPC just being a first user) is good. See the next patch for trivially migrating most callers, and there's there one or two more calling sites that require a bit more attention and a dedicated patch.

Daniel Cheng

Yes, I don't really want to take a CL that changes a thousand lines given how little use of WithUnownedBuffer there is, especially if it means we're adding a virtual or duplicating functions. It's not likely there will be more uses introduced anyway.

Mikel Astiz

To make sure I understand your stance: is your point about IPC code specifically (which IIUC you would rather not refactor even mechanically in light of upcoming code cleanups) or more generally about the idea of deprecating `Pickle::WithUnownedBuffer` in favor of introducing `PickleIterator::WithUnownedData()`?

If the latter, I will sadly abandon this patch series (and stick to what I started with, which is spanifying the public interface). The main downside IMO is that Pickle's implementation cannot be simplified to adopt a standard container (e.g. HeapBuffer, vector or InlinedVector) and hopefully avoid unsafe buffer annotations.

If your point is about IPC code specifically, I will consider the middle ground that Tom suggested (other thread in this CL), which is to allowlist IPC for this WithUnownedBuffer, but migrate other callers to PickleIterator. In this scenario, Pickle's internal simplifications would need to wait until legacy IPC (or at least attachment support) is cleaned up. That said, before embracing this blockage, I would make another attempt with this patch because there's another variant that may address the concerns you have listed so far (except for the mechanical changes being large).

Daniel Cheng

I'd rather leave all the existing ParamTraits alone at this point if at all possible. I'm fine with spanifying Pickle's API, and I think it's OK (if suboptimal) it uses some `UNSAFE_BUFFERS()` internally until a time we don't have to deal with `ParamTraits`.

Open in Gerrit

Related details

Attention is currently required from:
  • Mikel Astiz
  • Tom Sepez
Gerrit-Attention: Mikel Astiz <mas...@chromium.org>
Gerrit-Comment-Date: Tue, 27 Jan 2026 16:48:39 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Mikel Astiz (Gerrit)

unread,
Jan 27, 2026, 12:05:29 PM (6 days ago) Jan 27
to Tom Sepez, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, jackshira+...@google.com, andrewxu+wat...@google.com, ozone-...@chromium.org, multipaste-...@google.com, asvitkine...@chromium.org, rmcelra...@chromium.org, jonmann+w...@chromium.org, dmblack+watc...@google.com, nickdiego+wa...@igalia.com, crisrael+...@google.com, max+watc...@igalia.com, pushi+wa...@google.com, ajayramamurt...@google.com, sloboda...@chromium.org, agriev...@chromium.org, aixba+wat...@chromium.org, android-web...@chromium.org, andysjl...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, bnc+...@chromium.org, browser-comp...@chromium.org, chfreme...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, chromiumme...@microsoft.com, crostin...@chromium.org, dcheng+c...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watching...@chromium.org, dmurph+watc...@chromium.org, droger+w...@chromium.org, druber...@chromium.org, edgesto...@microsoft.com, extension...@chromium.org, feature-me...@chromium.org, filesapp...@chromium.org, fuzzin...@chromium.org, gavin...@chromium.org, gcasto+w...@chromium.org, harringt...@chromium.org, ipc-securi...@chromium.org, iwells...@chromium.org, japhet+...@chromium.org, kinuko+...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, media-cro...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, mpdento...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org, nwoked...@chromium.org, petewi...@chromium.org, philli...@chromium.org, pmonett...@chromium.org, rginda...@chromium.org, rsesek...@chromium.org, storage...@chromium.org, vakh+safe_br...@chromium.org, vasilii+watchlis...@chromium.org, webap...@microsoft.com, xinghui...@chromium.org, yhanada+...@chromium.org, zackha...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Daniel Cheng and Tom Sepez

Mikel Astiz added 2 comments

Patchset-level comments
Daniel Cheng . unresolved

So legacy IPC is essentially dead, but we have some bits that still remain due to `[Native]` messages.

I think it would probably be better to try to get rid of it (https://issues.chromium.org/issues/393179188) and see how much API surface is left.

The allowlist is at https://source.chromium.org/chromium/chromium/src/+/main:mojo/public/tools/bindings/checks/mojom_attributes_check.py;l=98;drc=e7bae9e99c6257ba4d08e7dc0dcf27eb5f2573e6 and there's almost certainly some low-hanging fruit on there.

Mikel Astiz

I fear the bug linked above could be another rabbit hole and I feel like unblocking the removal of `Pickle::WithUnownedBuffer` (which I find very error-prone) asap would be a very good thing; do you agree?

If legacy IPC is semi-dead, does anything speak against submitting this patch?

I don't particularly see downsides but I'm seeking guidance, and in particular there's the question of whether the new API introduced in `PickleIterator` (with IPC just being a first user) is good. See the next patch for trivially migrating most callers, and there's there one or two more calling sites that require a bit more attention and a dedicated patch.

Daniel Cheng

Yes, I don't really want to take a CL that changes a thousand lines given how little use of WithUnownedBuffer there is, especially if it means we're adding a virtual or duplicating functions. It's not likely there will be more uses introduced anyway.

Mikel Astiz

To make sure I understand your stance: is your point about IPC code specifically (which IIUC you would rather not refactor even mechanically in light of upcoming code cleanups) or more generally about the idea of deprecating `Pickle::WithUnownedBuffer` in favor of introducing `PickleIterator::WithUnownedData()`?

If the latter, I will sadly abandon this patch series (and stick to what I started with, which is spanifying the public interface). The main downside IMO is that Pickle's implementation cannot be simplified to adopt a standard container (e.g. HeapBuffer, vector or InlinedVector) and hopefully avoid unsafe buffer annotations.

If your point is about IPC code specifically, I will consider the middle ground that Tom suggested (other thread in this CL), which is to allowlist IPC for this WithUnownedBuffer, but migrate other callers to PickleIterator. In this scenario, Pickle's internal simplifications would need to wait until legacy IPC (or at least attachment support) is cleaned up. That said, before embracing this blockage, I would make another attempt with this patch because there's another variant that may address the concerns you have listed so far (except for the mechanical changes being large).

Daniel Cheng

I'd rather leave all the existing ParamTraits alone at this point if at all possible. I'm fine with spanifying Pickle's API, and I think it's OK (if suboptimal) it uses some `UNSAFE_BUFFERS()` internally until a time we don't have to deal with `ParamTraits`.

Mikel Astiz

Understood that the ParamTraits should remain unchanged (definitely possible). It is also clear that spanifying Pickle's API is something you are fine with (gentle ping for https://crrev.com/c/7516607 in that case).

The remaining question is whether you would like to deprecate Pickle::WithUnownedBuffer() in favor of a newly-introduced equivalent API in PickleIterator, even if IPC code doesn't migrate to it (which is a temporary issue). To make this question more specific, whether or not I should pursue https://chromium-review.googlesource.com/c/chromium/src/+/7511849 (which now took the PickleIterator API from this patch, excluding the virtual destructor) and other remaining callers (excluding IPC code).

Mikel Astiz . resolved

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Tom Sepez
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Tue, 27 Jan 2026 17:05:18 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages