[Connection-Allowlist] Add UseCounters for allowlist enforcement. [chromium/src : main]

0 views
Skip to first unread message

Andrew Verge (Gerrit)

unread,
Mar 5, 2026, 11:20:26 AM (7 days ago) Mar 5
to Chromium Metrics Reviews, AyeAye, Alex Moshchuk, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Alex Moshchuk

Andrew Verge added 2 comments

File content/browser/renderer_host/network_restrictions_navigation_throttle.cc
Line 72, Patchset 3 (Latest): navigation_request.frame_tree_node()->current_frame_host(),
Andrew Verge . unresolved

Since we are mid-navigation here, and have not committed yet iiuc, I believe this refers to the current document in the frame rather than the new one. This feels a bit weird, since the Connection-Allowlist header applies for the new document. But if we just need a valid frame to trigger a UseCounter log, maybe that doesn't matter?

File content/browser/worker_host/network_restrictions_worker_throttle.h
Line 48, Patchset 3 (Latest): base::WeakPtr<RenderFrameHostImpl> creator_render_frame_host_;
Andrew Verge . unresolved

I originally tried storing this as a `raw_ptr`, but during tests, the RFH was being deleted before this throttle, so I switched to WeakPtr instead. I'm a bit confused about this. I figured the RFH's lifetime would be much longer than this object's.

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
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: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Gerrit-Change-Number: 7638752
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Mike West <mk...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Comment-Date: Thu, 05 Mar 2026 16:20:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Mar 5, 2026, 7:18:11 PM (7 days ago) Mar 5
to Chromium Metrics Reviews, AyeAye, Alex Moshchuk, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Alex Moshchuk

Andrew Verge added 1 comment

File content/browser/worker_host/worker_script_fetcher.cc
Line 545, Patchset 3 (Latest): creator_render_frame_host) {
Andrew Verge . unresolved

This check might not be necessary: if the creator rfh is somehow null, we can just skip logging the UseCounter, but maybe we shouldn't derail the whole throttle because of it?

Gerrit-Comment-Date: Fri, 06 Mar 2026 00:18:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Moshchuk (Gerrit)

unread,
Mar 6, 2026, 1:03:50 PM (6 days ago) Mar 6
to Andrew Verge, Hiroki Nakagawa, Chromium Metrics Reviews, AyeAye, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Andrew Verge and Hiroki Nakagawa

Alex Moshchuk added 6 comments

Commit Message
Line 21, Patchset 3 (Latest):However, I figured we could try this out first.
Alex Moshchuk . unresolved

Can probably rephrase this to be more of a TODO to do UMA later if we proceed here. :)

Line 23, Patchset 3 (Latest):Change-Id: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Alex Moshchuk . unresolved

Any bug number to add here?

File content/browser/loader/connection_allowlist_browsertest.cc
Line 48, Patchset 3 (Latest): std::string content_type;
Alex Moshchuk . unresolved

nit: consider creating a custom constructor so that it's not necessary to specify `/*content_type=*/""` in all places where we create ResponseEntry below and don't care about content_type.

File content/browser/renderer_host/network_restrictions_navigation_throttle.cc
Line 72, Patchset 3 (Latest): navigation_request.frame_tree_node()->current_frame_host(),
Andrew Verge . unresolved

Since we are mid-navigation here, and have not committed yet iiuc, I believe this refers to the current document in the frame rather than the new one. This feels a bit weird, since the Connection-Allowlist header applies for the new document. But if we just need a valid frame to trigger a UseCounter log, maybe that doesn't matter?

Alex Moshchuk

It does seem that something like `LogWebFeatureForCurrentPage` should record features for the page that's using the feature, rather than the previous page.

FWIW, this is called from WillProcessResponse() and WillCommitWithoutUrlLoader(), and in both of those cases we should have already determined the final RFH for this navigation, even though we haven't committed it yet. That would be in `navigation_request->GetRenderFrameHost()`. Would that work here? One caveat is that the metrics code will need to work on a speculative RFH - not sure if that's a problem.

File content/browser/worker_host/network_restrictions_worker_throttle.h
Line 48, Patchset 3 (Latest): base::WeakPtr<RenderFrameHostImpl> creator_render_frame_host_;
Andrew Verge . unresolved

I originally tried storing this as a `raw_ptr`, but during tests, the RFH was being deleted before this throttle, so I switched to WeakPtr instead. I'm a bit confused about this. I figured the RFH's lifetime would be much longer than this object's.

Alex Moshchuk

I'd have expected the same for these workers, but I'm not familiar enough with them. @nhi...@chromium.org, do you know if it's expected that the RFH that's creating a worker might be gone here?

File content/browser/worker_host/worker_script_fetcher.cc
Line 545, Patchset 3 (Latest): creator_render_frame_host) {
Andrew Verge . unresolved

This check might not be necessary: if the creator rfh is somehow null, we can just skip logging the UseCounter, but maybe we shouldn't derail the whole throttle because of it?

Alex Moshchuk

Yeah, seems dangerous in that if this timing is somehow possible to exploit, a page might abuse it to bypass the network restrictions for workers.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Verge
  • Hiroki Nakagawa
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: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Gerrit-Change-Number: 7638752
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Mike West <mk...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-Attention: Andrew Verge <ave...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Comment-Date: Fri, 06 Mar 2026 18:03:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Mar 9, 2026, 10:44:49 AM (3 days ago) Mar 9
to Hiroki Nakagawa, Chromium Metrics Reviews, AyeAye, Alex Moshchuk, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Hiroki Nakagawa

Andrew Verge added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Andrew Verge . resolved

Just a heads-up that I had some discussion with mk...@chromium.org, and we may attempt to do this logging in Blink instead, which would also help resolve some of the ambiguity here around frame and worker lifetime stuff.

Open in Gerrit

Related details

Attention is currently required from:
  • Hiroki Nakagawa
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: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Gerrit-Change-Number: 7638752
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Mike West <mk...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Comment-Date: Mon, 09 Mar 2026 14:44:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Hiroki Nakagawa (Gerrit)

unread,
Mar 10, 2026, 8:28:10 AM (3 days ago) Mar 10
to Andrew Verge, Chromium Metrics Reviews, AyeAye, Alex Moshchuk, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Andrew Verge

Hiroki Nakagawa added 2 comments

File content/browser/worker_host/network_restrictions_worker_throttle.h
Line 48, Patchset 3 (Latest): base::WeakPtr<RenderFrameHostImpl> creator_render_frame_host_;
Andrew Verge . unresolved

I originally tried storing this as a `raw_ptr`, but during tests, the RFH was being deleted before this throttle, so I switched to WeakPtr instead. I'm a bit confused about this. I figured the RFH's lifetime would be much longer than this object's.

Alex Moshchuk

I'd have expected the same for these workers, but I'm not familiar enough with them. @nhi...@chromium.org, do you know if it's expected that the RFH that's creating a worker might be gone here?

Hiroki Nakagawa

Yes, this throttle can outlive the RFH. The throttle is owned by WorkerScriptFetcher, which handles its own lifecycle. The fetcher self-destructs upon load completion or failure, independent of the RFH's lifetime.

https://source.chromium.org/chromium/chromium/src/+/main:content/browser/worker_host/worker_script_fetcher.h;l=88;drc=197888b6cfb248aeb11c418a4d4a03d2b2a5c23b

File content/browser/worker_host/worker_script_fetcher.cc
Line 545, Patchset 3 (Latest): creator_render_frame_host) {
Andrew Verge . unresolved

This check might not be necessary: if the creator rfh is somehow null, we can just skip logging the UseCounter, but maybe we shouldn't derail the whole throttle because of it?

Alex Moshchuk

Yeah, seems dangerous in that if this timing is somehow possible to exploit, a page might abuse it to bypass the network restrictions for workers.

Hiroki Nakagawa

`creator_render_frame_host` is null here when this is a nested worker (i.e., when a dedicated worker creates another dedicated worker). Instead of that, `ancestor_render_frame_host` should be used.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Verge
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: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Gerrit-Change-Number: 7638752
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Mike West <mk...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-Attention: Andrew Verge <ave...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Mar 2026 12:27:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Mar 10, 2026, 4:25:15 PM (2 days ago) Mar 10
to Hiroki Nakagawa, Chromium Metrics Reviews, AyeAye, Alex Moshchuk, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Alex Moshchuk and Hiroki Nakagawa

Andrew Verge added 3 comments

Patchset-level comments
Andrew Verge . resolved

No new code for now, just replying on some of the more ambiguous threads while I test out a renderer-side implementation.

File content/browser/renderer_host/network_restrictions_navigation_throttle.cc
Line 72, Patchset 3 (Latest): navigation_request.frame_tree_node()->current_frame_host(),
Andrew Verge . unresolved

Since we are mid-navigation here, and have not committed yet iiuc, I believe this refers to the current document in the frame rather than the new one. This feels a bit weird, since the Connection-Allowlist header applies for the new document. But if we just need a valid frame to trigger a UseCounter log, maybe that doesn't matter?

Alex Moshchuk

It does seem that something like `LogWebFeatureForCurrentPage` should record features for the page that's using the feature, rather than the previous page.

FWIW, this is called from WillProcessResponse() and WillCommitWithoutUrlLoader(), and in both of those cases we should have already determined the final RFH for this navigation, even though we haven't committed it yet. That would be in `navigation_request->GetRenderFrameHost()`. Would that work here? One caveat is that the metrics code will need to work on a speculative RFH - not sure if that's a problem.

Andrew Verge

I'm not sure how we'd test that a speculative RFH would work here.

The problem with testing use counters logged from the browser is that you essentially have to use mocks to verify them: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/use_counter_wiki.md#:~:text=For%20use%20counters%20recorded%20from%20the%20browser%20process

Because the mock isn't actually going to do anything with it once provided, any behavior specific to speculative RFHs won't be exercised.

I clicked through the code for ChromeContentBrowserClient to see what will actually happen in prod, and I see we eventually need the PageLoadTracker for a frame, which I imagine doesn't exist for a speculative one: https://source.chromium.org/chromium/chromium/src/+/main:components/page_load_metrics/browser/metrics_web_contents_observer.cc;drc=10b6082ae57b34c1d623275ed00dae987fb2a590;l=1446

Looking through write references to active_pages_ and inactive_pages_ in that file, I don't see anything implying that a PageLoadTracker exists for a pending navigation, which to me implies that we're not expected to log usecounters for pending navigations.

File content/browser/worker_host/network_restrictions_worker_throttle.h
Line 48, Patchset 3 (Latest): base::WeakPtr<RenderFrameHostImpl> creator_render_frame_host_;
Andrew Verge . unresolved

I originally tried storing this as a `raw_ptr`, but during tests, the RFH was being deleted before this throttle, so I switched to WeakPtr instead. I'm a bit confused about this. I figured the RFH's lifetime would be much longer than this object's.

Alex Moshchuk

I'd have expected the same for these workers, but I'm not familiar enough with them. @nhi...@chromium.org, do you know if it's expected that the RFH that's creating a worker might be gone here?

Hiroki Nakagawa

Yes, this throttle can outlive the RFH. The throttle is owned by WorkerScriptFetcher, which handles its own lifecycle. The fetcher self-destructs upon load completion or failure, independent of the RFH's lifetime.

https://source.chromium.org/chromium/chromium/src/+/main:content/browser/worker_host/worker_script_fetcher.h;l=88;drc=197888b6cfb248aeb11c418a4d4a03d2b2a5c23b

Andrew Verge

Do you think keeping the (creator/ancestor) RFH as a WeakPtr is acceptable here? Under test we confirm that if both are alive at once the metric will be logged. I imagine that in normal operation (meaning, not immediate teardown at the end of a browsertest), the RFH will generally be alive longer than the duration of a single script load.

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Hiroki Nakagawa
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: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Gerrit-Change-Number: 7638752
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Mike West <mk...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Mar 2026 20:25:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
Comment-In-Reply-To: Hiroki Nakagawa <nhi...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Moshchuk (Gerrit)

unread,
Mar 11, 2026, 7:17:12 PM (yesterday) Mar 11
to Andrew Verge, Hiroki Nakagawa, Chromium Metrics Reviews, AyeAye, Mike West, Shivani Sharma, blink-...@chromium.org, alexmo...@chromium.org, blink-work...@chromium.org, creis...@chromium.org, blink-re...@chromium.org, navigation...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, asvitkine...@chromium.org
Attention needed from Andrew Verge and Hiroki Nakagawa

Alex Moshchuk added 2 comments

File content/browser/renderer_host/network_restrictions_navigation_throttle.cc
Line 72, Patchset 3 (Latest): navigation_request.frame_tree_node()->current_frame_host(),
Andrew Verge . unresolved

Since we are mid-navigation here, and have not committed yet iiuc, I believe this refers to the current document in the frame rather than the new one. This feels a bit weird, since the Connection-Allowlist header applies for the new document. But if we just need a valid frame to trigger a UseCounter log, maybe that doesn't matter?

Alex Moshchuk

It does seem that something like `LogWebFeatureForCurrentPage` should record features for the page that's using the feature, rather than the previous page.

FWIW, this is called from WillProcessResponse() and WillCommitWithoutUrlLoader(), and in both of those cases we should have already determined the final RFH for this navigation, even though we haven't committed it yet. That would be in `navigation_request->GetRenderFrameHost()`. Would that work here? One caveat is that the metrics code will need to work on a speculative RFH - not sure if that's a problem.

Andrew Verge

I'm not sure how we'd test that a speculative RFH would work here.

The problem with testing use counters logged from the browser is that you essentially have to use mocks to verify them: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/use_counter_wiki.md#:~:text=For%20use%20counters%20recorded%20from%20the%20browser%20process

Because the mock isn't actually going to do anything with it once provided, any behavior specific to speculative RFHs won't be exercised.

I clicked through the code for ChromeContentBrowserClient to see what will actually happen in prod, and I see we eventually need the PageLoadTracker for a frame, which I imagine doesn't exist for a speculative one: https://source.chromium.org/chromium/chromium/src/+/main:components/page_load_metrics/browser/metrics_web_contents_observer.cc;drc=10b6082ae57b34c1d623275ed00dae987fb2a590;l=1446

Looking through write references to active_pages_ and inactive_pages_ in that file, I don't see anything implying that a PageLoadTracker exists for a pending navigation, which to me implies that we're not expected to log usecounters for pending navigations.

Alex Moshchuk

OK, sounds like going via a speculative RFH might not work then, sigh. (It does kind of make sense that a document shouldn't be using any features unless it actually commits.)

File content/browser/worker_host/network_restrictions_worker_throttle.h
Line 48, Patchset 3 (Latest): base::WeakPtr<RenderFrameHostImpl> creator_render_frame_host_;
Andrew Verge . unresolved

I originally tried storing this as a `raw_ptr`, but during tests, the RFH was being deleted before this throttle, so I switched to WeakPtr instead. I'm a bit confused about this. I figured the RFH's lifetime would be much longer than this object's.

Alex Moshchuk

I'd have expected the same for these workers, but I'm not familiar enough with them. @nhi...@chromium.org, do you know if it's expected that the RFH that's creating a worker might be gone here?

Hiroki Nakagawa

Yes, this throttle can outlive the RFH. The throttle is owned by WorkerScriptFetcher, which handles its own lifecycle. The fetcher self-destructs upon load completion or failure, independent of the RFH's lifetime.

https://source.chromium.org/chromium/chromium/src/+/main:content/browser/worker_host/worker_script_fetcher.h;l=88;drc=197888b6cfb248aeb11c418a4d4a03d2b2a5c23b

Andrew Verge

Do you think keeping the (creator/ancestor) RFH as a WeakPtr is acceptable here? Under test we confirm that if both are alive at once the metric will be logged. I imagine that in normal operation (meaning, not immediate teardown at the end of a browsertest), the RFH will generally be alive longer than the duration of a single script load.

Alex Moshchuk

Deferring this to nhiroki@. Maybe that's acceptable if this is just for metrics, where it might be ok to not log them if it's very rare for the RFH to not be alive here.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Verge
  • Hiroki Nakagawa
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: I4aa01ebc8d9be34ec8c2a6c2c7713929f819132c
Gerrit-Change-Number: 7638752
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Mike West <mk...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-Attention: Andrew Verge <ave...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Comment-Date: Wed, 11 Mar 2026 23:17:03 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages