Reject negative request IDs and stabilize interception [chromium/src : main]

0 views
Skip to first unread message

Danil Somsikov (Gerrit)

unread,
Apr 22, 2026, 2:45:03 AM (8 days ago) Apr 22
to Andrey Kosyakov, Chromium LUCI CQ, Hiroki Nakagawa, android-bu...@system.gserviceaccount.com, horo+...@chromium.org, blink-work...@chromium.org, servicewor...@chromium.org, loading...@chromium.org, kinuko...@chromium.org, kinuko+ser...@chromium.org, shimazu+se...@chromium.org, devtools...@chromium.org
Attention needed from Andrey Kosyakov

Danil Somsikov voted

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

Related details

Attention is currently required from:
  • Andrey Kosyakov
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: I67d989df94adb97f54a2a6920278b0e7ad94e61c
Gerrit-Change-Number: 7767259
Gerrit-PatchSet: 38
Gerrit-Owner: Danil Somsikov <d...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Apr 2026 06:44:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

mmenke (Gerrit)

unread,
10:53 AM (5 hours ago) 10:53 AM
to Danil Somsikov, Takashi Toyoshima, Yoshisato Yanagisawa, Code Review Nudger, Andrey Kosyakov, Chromium LUCI CQ, Hiroki Nakagawa, android-bu...@system.gserviceaccount.com, horo+...@chromium.org, blink-work...@chromium.org, servicewor...@chromium.org, loading...@chromium.org, kinuko...@chromium.org, kinuko+ser...@chromium.org, shimazu+se...@chromium.org, devtools...@chromium.org
Attention needed from Andrey Kosyakov, Danil Somsikov, Takashi Toyoshima and Yoshisato Yanagisawa

mmenke added 2 comments

Patchset-level comments
File-level comment, Patchset 38 (Latest):
mmenke . resolved

[toyoshim] Can you take this one?

Given my lack of familiarity with ServiceWorker, I don't feel like I can adequately review if trusting service worker main resources or scripts is a problem, and probably not useful for me to do a dive into that.

File content/browser/loader/url_loader_factory_utils.cc
Line 249, Patchset 38 (Latest): bool is_browser_initiated =
mmenke . unresolved

This seems inaccurate to me. If a webpage triggers a navigation, I would not say it's browser initiated. Its ResourceRequest::initiator is the renderer's orign, I believe.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
  • Danil Somsikov
  • Takashi Toyoshima
  • Yoshisato Yanagisawa
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: I67d989df94adb97f54a2a6920278b0e7ad94e61c
    Gerrit-Change-Number: 7767259
    Gerrit-PatchSet: 38
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Reviewer: Yoshisato Yanagisawa <yyana...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: mmenke <mme...@chromium.org>
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Yoshisato Yanagisawa <yyana...@chromium.org>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 14:53:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Danil Somsikov (Gerrit)

    unread,
    11:13 AM (5 hours ago) 11:13 AM
    to Takashi Toyoshima, Yoshisato Yanagisawa, Code Review Nudger, Andrey Kosyakov, Chromium LUCI CQ, Hiroki Nakagawa, android-bu...@system.gserviceaccount.com, horo+...@chromium.org, blink-work...@chromium.org, servicewor...@chromium.org, loading...@chromium.org, kinuko...@chromium.org, kinuko+ser...@chromium.org, shimazu+se...@chromium.org, devtools...@chromium.org
    Attention needed from Andrey Kosyakov, Takashi Toyoshima, Yoshisato Yanagisawa and mmenke

    Danil Somsikov added 1 comment

    File content/browser/loader/url_loader_factory_utils.cc
    Line 249, Patchset 38 (Latest): bool is_browser_initiated =
    mmenke . unresolved

    This seems inaccurate to me. If a webpage triggers a navigation, I would not say it's browser initiated. Its ResourceRequest::initiator is the renderer's orign, I believe.

    Danil Somsikov

    That's a fair point, Matt. In the context of this fix, the flag is intended to identify requests where the `request_id` is generated and controlled by the browser process, which is why they are permitted to use negative values. Even for renderer-triggered navigations, the browser process manages the request and assigns the ID, distinguishing them from standard renderer-initiated subresource requests.

    Would renaming the flag to something like `is_browser_generated_id` or `is_browser_controlled_id` address your concern about the semantic ambiguity?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Takashi Toyoshima
    • Yoshisato Yanagisawa
    • mmenke
    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: I67d989df94adb97f54a2a6920278b0e7ad94e61c
    Gerrit-Change-Number: 7767259
    Gerrit-PatchSet: 38
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Reviewer: Yoshisato Yanagisawa <yyana...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
    Gerrit-CC: mmenke <mme...@chromium.org>
    Gerrit-Attention: mmenke <mme...@chromium.org>
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Yoshisato Yanagisawa <yyana...@chromium.org>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 15:13:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: mmenke <mme...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    mmenke (Gerrit)

    unread,
    11:21 AM (5 hours ago) 11:21 AM
    to Danil Somsikov, Takashi Toyoshima, Yoshisato Yanagisawa, Code Review Nudger, Andrey Kosyakov, Chromium LUCI CQ, Hiroki Nakagawa, android-bu...@system.gserviceaccount.com, horo+...@chromium.org, blink-work...@chromium.org, servicewor...@chromium.org, loading...@chromium.org, kinuko...@chromium.org, kinuko+ser...@chromium.org, shimazu+se...@chromium.org, devtools...@chromium.org
    Attention needed from Andrey Kosyakov, Danil Somsikov, Takashi Toyoshima and Yoshisato Yanagisawa

    mmenke added 1 comment

    File content/browser/loader/url_loader_factory_utils.cc
    Line 249, Patchset 38 (Latest): bool is_browser_initiated =
    mmenke . unresolved

    This seems inaccurate to me. If a webpage triggers a navigation, I would not say it's browser initiated. Its ResourceRequest::initiator is the renderer's orign, I believe.

    Danil Somsikov

    That's a fair point, Matt. In the context of this fix, the flag is intended to identify requests where the `request_id` is generated and controlled by the browser process, which is why they are permitted to use negative values. Even for renderer-triggered navigations, the browser process manages the request and assigns the ID, distinguishing them from standard renderer-initiated subresource requests.

    Would renaming the flag to something like `is_browser_generated_id` or `is_browser_controlled_id` address your concern about the semantic ambiguity?

    mmenke

    Works for me, though I don't see an ID being passed into this function.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Danil Somsikov
    • Takashi Toyoshima
    • Yoshisato Yanagisawa
    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: I67d989df94adb97f54a2a6920278b0e7ad94e61c
    Gerrit-Change-Number: 7767259
    Gerrit-PatchSet: 38
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Reviewer: Yoshisato Yanagisawa <yyana...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
    Gerrit-CC: mmenke <mme...@chromium.org>
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Yoshisato Yanagisawa <yyana...@chromium.org>
    Gerrit-Comment-Date: Wed, 29 Apr 2026 15:21:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: mmenke <mme...@chromium.org>
    Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages