Replace DidCommit's->origin with NavigationRequest::GetOriginToCommit() [chromium/src : main]

2 views
Skip to first unread message

Monica Chintala (Gerrit)

unread,
Nov 18, 2025, 11:09:57 AM11/18/25
to Rakina Zata Amni, Daniel Cheng, Dave Risney, Liang Zhao, Charlie Reis, Chromium IPC Reviews, Alex Moshchuk, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk, Charlie Reis, Chromium IPC Reviews, Daniel Cheng, Dave Risney, Liang Zhao and Rakina Zata Amni

Monica Chintala added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Monica Chintala . resolved

CYPTAL, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Charlie Reis
  • Chromium IPC Reviews
  • Daniel Cheng
  • Dave Risney
  • Liang Zhao
  • Rakina Zata Amni
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: Iac078d4811636102975f8d91c3e03a96122a8db4
Gerrit-Change-Number: 7165327
Gerrit-PatchSet: 7
Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Dave Risney <david....@microsoft.com>
Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Dave Risney <david....@microsoft.com>
Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Charlie Reis <cr...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Nov 2025 16:09:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Nov 18, 2025, 11:10:31 AM11/18/25
to Monica Chintala, Chromium IPC Reviews, Rakina Zata Amni, Daniel Cheng, Dave Risney, Liang Zhao, Charlie Reis, Alex Moshchuk, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
Attention needed from Alex Moshchuk, Charlie Reis, Daniel Cheng, Dave Risney, Liang Zhao and Rakina Zata Amni

Message from gwsq

From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
IPC: dch...@chromium.org

📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

IPC reviewer(s): dch...@chromium.org

Note: IPC gwsq added no new reviewers; existing reviewers satisfied requirements!

Reviewer source(s):
dch...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Charlie Reis
  • Daniel Cheng
  • Dave Risney
  • Liang Zhao
  • Rakina Zata Amni
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: Iac078d4811636102975f8d91c3e03a96122a8db4
Gerrit-Change-Number: 7165327
Gerrit-PatchSet: 7
Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Dave Risney <david....@microsoft.com>
Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Dave Risney <david....@microsoft.com>
Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: Charlie Reis <cr...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Nov 2025 16:10:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Monica Chintala (Gerrit)

unread,
Nov 18, 2025, 2:22:31 PM11/18/25
to Liang Zhao, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
Attention needed from Dave Risney and Liang Zhao

Monica Chintala added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Monica Chintala . resolved

Similarly adding Liang to get the initial review!

Open in Gerrit

Related details

Attention is currently required from:
  • Dave Risney
  • Liang Zhao
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: Iac078d4811636102975f8d91c3e03a96122a8db4
Gerrit-Change-Number: 7165327
Gerrit-PatchSet: 9
Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Dave Risney <david....@microsoft.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Dave Risney <david....@microsoft.com>
Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
Gerrit-Comment-Date: Tue, 18 Nov 2025 19:22:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Liang Zhao (Gerrit)

unread,
Nov 18, 2025, 5:31:41 PM11/18/25
to Monica Chintala, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
Attention needed from Dave Risney and Monica Chintala

Liang Zhao added 4 comments

File content/browser/renderer_host/render_frame_host_impl.cc
Line 16513, Patchset 9 (Latest): DCHECK(commit_params->origin_to_commit);
Liang Zhao . unresolved

Should this be CHECK instead of DCHECK?

File content/browser/security_exploit_browsertest.cc
Line 516, Patchset 9 (Latest):// TODO(crbug.com/457478023): Disable the test due to navigation origin changes.
// Use this crbug to fix the test accordingly and enable it.
Liang Zhao . unresolved

Do we still need this test? It seems that the test is trying to set unexpected origin in DidCommit IPC call, with us removing the parameter, should we remove the test?

File content/public/test/browser_test_utils.cc
Line 524, Patchset 9 (Latest): navigation_request->SetOriginToCommitForTesting(new_origin_);
Liang Zhao . unresolved

Which tests are still relying on origin getting changed after DidCommitNavigation? If there should be no test relying on this, could we simply remove the support of setting the "committed origin"? If that is what we should do, we could potentially simply ignore new_origin_ in this CL and create separate CL to remove the new_origin_ support from this class.

File content/renderer/render_frame_impl.cc
Line 989, Patchset 9 (Latest): if (commit_params.origin_to_commit) {
Liang Zhao . unresolved

Could you add comment on when commit_params.origin_to_commit does not have value and what's the impact of leaving navigation_params->origin_to_commit unset.

Open in Gerrit

Related details

Attention is currently required from:
  • Dave Risney
  • Monica Chintala
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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 9
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Monica Chintala <moni...@microsoft.com>
    Gerrit-Comment-Date: Tue, 18 Nov 2025 22:31:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Monica Chintala (Gerrit)

    unread,
    Dec 2, 2025, 8:30:08 PM12/2/25
    to Liang Zhao, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Dave Risney and Liang Zhao

    Monica Chintala added 4 comments

    File content/browser/renderer_host/render_frame_host_impl.cc
    Line 16513, Patchset 9: DCHECK(commit_params->origin_to_commit);
    Liang Zhao . resolved

    Should this be CHECK instead of DCHECK?

    Monica Chintala

    Done

    File content/browser/security_exploit_browsertest.cc
    Line 516, Patchset 9:// TODO(crbug.com/457478023): Disable the test due to navigation origin changes.

    // Use this crbug to fix the test accordingly and enable it.
    Liang Zhao . resolved

    Do we still need this test? It seems that the test is trying to set unexpected origin in DidCommit IPC call, with us removing the parameter, should we remove the test?

    Monica Chintala

    SecurityExploitBrowserTest.CrossOriginSameDocumentCommitFromAboutBlank - agree, removed the test as renderer no longer supplies the committed origin

    File content/public/test/browser_test_utils.cc
    Line 524, Patchset 9: navigation_request->SetOriginToCommitForTesting(new_origin_);
    Liang Zhao . unresolved

    Which tests are still relying on origin getting changed after DidCommitNavigation? If there should be no test relying on this, could we simply remove the support of setting the "committed origin"? If that is what we should do, we could potentially simply ignore new_origin_ in this CL and create separate CL to remove the new_origin_ support from this class.

    Monica Chintala

    SitePerProcessBrowserTest.CommittedOriginIncompatibleWithOriginLock - can be removed as well but additionally it sanity-checks ProcessLock equality for same-origin URLs and inequality for cross-origin. But this isn't the purpose for the test and covered by other tests.

    ChromeSecurityExploitBrowserTest.CommitExtensionOriginInWebProces - can be removed as well. This test ensures non-extension process cannot send a about:blank commit with an extension origin.

    Do you agree? If so, I can remove the tests in the current cl and later remove new_origin_?

    File content/renderer/render_frame_impl.cc
    Line 989, Patchset 9: if (commit_params.origin_to_commit) {
    Liang Zhao . unresolved

    Could you add comment on when commit_params.origin_to_commit does not have value and what's the impact of leaving navigation_params->origin_to_commit unset.

    Monica Chintala

    This is needed for some tests(RenderFrameImplTest/RenderViewImplTest) that creates DummyCommitNavigationParams using blink::CreateCommitNavigationParams().

    Also, this check exists before and removed when we changed origin_to_commit was always set but in the current cl I made it optional so added the check back

    https://source.chromium.org/chromium/chromium/src/+/ae845bfbaace3a356b66de078d6d70c84192c7f7:content/renderer/render_frame_impl.cc;dlc=805c26171d90dd5e760db7753484729ee9b28df2

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Risney
    • Liang Zhao
    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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 11
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
    Gerrit-Comment-Date: Wed, 03 Dec 2025 01:29:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Liang Zhao <lz...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Monica Chintala (Gerrit)

    unread,
    Feb 11, 2026, 8:17:17 PM (9 days ago) Feb 11
    to Liang Zhao, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, edg...@microsoft.com, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Dave Risney and Liang Zhao

    Monica Chintala added 2 comments

    File content/browser/navigation_browsertest.cc
    Line 7510, Patchset 15 (Parent): (*params)->origin = url::Origin::Create(GURL("https://example.com/"));
    Monica Chintala . unresolved

    lzhao@ Added the feature flag to handle any regressions. Should we also keep this in test files behind the feature flag?

    File content/browser/renderer_host/render_frame_host_impl.cc
    Line 15417, Patchset 15 (Parent): // TODO(https://crbug.com/402272788): Remove `origin` from DidCommitParams,
    // making this check unnecessary.
    if (navigation_request &&
    navigation_request->commit_params().origin_to_commit != params->origin) {
    bad_message::ReceivedBadMessage(process,
    bad_message::RFH_ORIGIN_TO_COMMIT_MISMATCH);
    return false;
    }
    Monica Chintala . unresolved

    lzhao@ Should we also keep this behind a feature flag?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Risney
    • Liang Zhao
    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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 15
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
    Gerrit-Comment-Date: Thu, 12 Feb 2026 01:17:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liang Zhao (Gerrit)

    unread,
    Feb 12, 2026, 1:52:27 PM (8 days ago) Feb 12
    to Monica Chintala, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, edg...@microsoft.com, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Dave Risney and Monica Chintala

    Liang Zhao added 5 comments

    Commit Message
    Line 21, Patchset 15 (Latest):handle edge cases where GetOriginToCommit() cannot be safely called sometimes. As GetOriginToCommit() relies on SandboxFlagsToCommit(),
    Liang Zhao . unresolved

    line too long

    File content/browser/navigation_browsertest.cc
    Line 7510, Patchset 15 (Parent): (*params)->origin = url::Origin::Create(GURL("https://example.com/"));
    Monica Chintala . unresolved

    lzhao@ Added the feature flag to handle any regressions. Should we also keep this in test files behind the feature flag?

    Liang Zhao

    The normal way is to update the tests to be parameterized tests and tests the behavior for both when the feature is enabled and disabled.
    Since the old code is still used when the feature is disabled, we actually should not delete any tests at this moment. We should update them to verify behavior when the feature is enabled and disabled.

    File content/browser/renderer_host/render_frame_host_impl.cc
    Line 15417, Patchset 15 (Parent): // TODO(https://crbug.com/402272788): Remove `origin` from DidCommitParams,
    // making this check unnecessary.
    if (navigation_request &&
    navigation_request->commit_params().origin_to_commit != params->origin) {
    bad_message::ReceivedBadMessage(process,
    bad_message::RFH_ORIGIN_TO_COMMIT_MISMATCH);
    return false;
    }
    Monica Chintala . unresolved

    lzhao@ Should we also keep this behind a feature flag?

    Liang Zhao

    Yes. Since we still have origin_deprecated and that would be used when the feature is disabled. Or can we use NavigationRequest::GetOriginToCommit for the check so that it works for both feature disabled and enabled?

    Line 17927, Patchset 15 (Parent): if (everything_except_origin_matches &&
    (!ShouldVerify("origin") ||
    request->state() < NavigationRequest::WILL_PROCESS_RESPONSE ||
    request->GetOriginToCommit() == params.origin)) {
    // Don't do a DumpWithoutCrashing if everything matches. Note that we save
    // `everything_except_origin_matches` separately so that we can skip doing
    // a DumpWithoutCrashing at the end of this function if the origin turns
    // out to match (actual origin match checking is done below as it does its
    // own DumpWithoutCrashing).
    return;
    Liang Zhao . unresolved

    We might also want to keep this when the feature is disabled.

    File content/public/test/browser_test_utils.cc
    Line 524, Patchset 9: navigation_request->SetOriginToCommitForTesting(new_origin_);
    Liang Zhao . unresolved

    Which tests are still relying on origin getting changed after DidCommitNavigation? If there should be no test relying on this, could we simply remove the support of setting the "committed origin"? If that is what we should do, we could potentially simply ignore new_origin_ in this CL and create separate CL to remove the new_origin_ support from this class.

    Monica Chintala

    SitePerProcessBrowserTest.CommittedOriginIncompatibleWithOriginLock - can be removed as well but additionally it sanity-checks ProcessLock equality for same-origin URLs and inequality for cross-origin. But this isn't the purpose for the test and covered by other tests.

    ChromeSecurityExploitBrowserTest.CommitExtensionOriginInWebProces - can be removed as well. This test ensures non-extension process cannot send a about:blank commit with an extension origin.

    Do you agree? If so, I can remove the tests in the current cl and later remove new_origin_?

    Liang Zhao

    Looks like we now have both old code and new code, so we would need to keep all test code and ensure that the test works properly when the feature is disabled or enabled. We could skip some parts of the tests if some checks are not applicable anymore.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Risney
    • Monica Chintala
    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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 15
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Monica Chintala <moni...@microsoft.com>
    Gerrit-Comment-Date: Thu, 12 Feb 2026 18:52:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Liang Zhao <lz...@microsoft.com>
    Comment-In-Reply-To: Monica Chintala <moni...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rakina Zata Amni (Gerrit)

    unread,
    Feb 13, 2026, 5:06:47 AM (7 days ago) Feb 13
    to Monica Chintala, Liang Zhao, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, edg...@microsoft.com, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Dave Risney and Monica Chintala

    Rakina Zata Amni added 1 comment

    File content/renderer/render_frame_impl.cc
    Line 989, Patchset 9: if (commit_params.origin_to_commit) {
    Liang Zhao . unresolved

    Could you add comment on when commit_params.origin_to_commit does not have value and what's the impact of leaving navigation_params->origin_to_commit unset.

    Monica Chintala

    This is needed for some tests(RenderFrameImplTest/RenderViewImplTest) that creates DummyCommitNavigationParams using blink::CreateCommitNavigationParams().

    Also, this check exists before and removed when we changed origin_to_commit was always set but in the current cl I made it optional so added the check back

    https://source.chromium.org/chromium/chromium/src/+/ae845bfbaace3a356b66de078d6d70c84192c7f7:content/renderer/render_frame_impl.cc;dlc=805c26171d90dd5e760db7753484729ee9b28df2

    Rakina Zata Amni

    Would it be possible to just set the origin_to_commit value on those tests, or are there other cases that won't set this?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Risney
    • Monica Chintala
    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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 17
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Monica Chintala <moni...@microsoft.com>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 10:06:14 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Monica Chintala (Gerrit)

    unread,
    Feb 13, 2026, 6:58:10 PM (7 days ago) Feb 13
    to Rakina Zata Amni, Liang Zhao, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, edg...@microsoft.com, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Dave Risney and Liang Zhao

    Monica Chintala added 5 comments

    Commit Message
    Line 21, Patchset 15:handle edge cases where GetOriginToCommit() cannot be safely called sometimes. As GetOriginToCommit() relies on SandboxFlagsToCommit(),
    Liang Zhao . resolved

    line too long

    Monica Chintala

    Done

    File content/browser/navigation_browsertest.cc
    Line 7510, Patchset 15 (Parent): (*params)->origin = url::Origin::Create(GURL("https://example.com/"));
    Monica Chintala . resolved

    lzhao@ Added the feature flag to handle any regressions. Should we also keep this in test files behind the feature flag?

    Liang Zhao

    The normal way is to update the tests to be parameterized tests and tests the behavior for both when the feature is enabled and disabled.
    Since the old code is still used when the feature is disabled, we actually should not delete any tests at this moment. We should update them to verify behavior when the feature is enabled and disabled.

    Monica Chintala

    All related browser tests are updated with parameterized tests to run for feature when enabled/disabled. For unit_tests, assignment of origin_deprecated is behind a feature flag.

    File content/browser/renderer_host/render_frame_host_impl.cc
    Line 15417, Patchset 15 (Parent): // TODO(https://crbug.com/402272788): Remove `origin` from DidCommitParams,
    // making this check unnecessary.
    if (navigation_request &&
    navigation_request->commit_params().origin_to_commit != params->origin) {
    bad_message::ReceivedBadMessage(process,
    bad_message::RFH_ORIGIN_TO_COMMIT_MISMATCH);
    return false;
    }
    Monica Chintala . resolved

    lzhao@ Should we also keep this behind a feature flag?

    Liang Zhao

    Yes. Since we still have origin_deprecated and that would be used when the feature is disabled. Or can we use NavigationRequest::GetOriginToCommit for the check so that it works for both feature disabled and enabled?

    Monica Chintala

    using NavigationRequest::GetOriginToCommit for this check and will delete later when feature flag is removed

    Line 17927, Patchset 15 (Parent): if (everything_except_origin_matches &&
    (!ShouldVerify("origin") ||
    request->state() < NavigationRequest::WILL_PROCESS_RESPONSE ||
    request->GetOriginToCommit() == params.origin)) {
    // Don't do a DumpWithoutCrashing if everything matches. Note that we save
    // `everything_except_origin_matches` separately so that we can skip doing
    // a DumpWithoutCrashing at the end of this function if the origin turns
    // out to match (actual origin match checking is done below as it does its
    // own DumpWithoutCrashing).
    return;
    Liang Zhao . resolved

    We might also want to keep this when the feature is disabled.

    Monica Chintala

    Done

    File content/public/test/browser_test_utils.cc
    Line 524, Patchset 9: navigation_request->SetOriginToCommitForTesting(new_origin_);
    Liang Zhao . resolved

    Which tests are still relying on origin getting changed after DidCommitNavigation? If there should be no test relying on this, could we simply remove the support of setting the "committed origin"? If that is what we should do, we could potentially simply ignore new_origin_ in this CL and create separate CL to remove the new_origin_ support from this class.

    Monica Chintala

    SitePerProcessBrowserTest.CommittedOriginIncompatibleWithOriginLock - can be removed as well but additionally it sanity-checks ProcessLock equality for same-origin URLs and inequality for cross-origin. But this isn't the purpose for the test and covered by other tests.

    ChromeSecurityExploitBrowserTest.CommitExtensionOriginInWebProces - can be removed as well. This test ensures non-extension process cannot send a about:blank commit with an extension origin.

    Do you agree? If so, I can remove the tests in the current cl and later remove new_origin_?

    Liang Zhao

    Looks like we now have both old code and new code, so we would need to keep all test code and ensure that the test works properly when the feature is disabled or enabled. We could skip some parts of the tests if some checks are not applicable anymore.

    Monica Chintala

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Risney
    • Liang Zhao
    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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 18
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 23:58:04 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Monica Chintala (Gerrit)

    unread,
    Feb 19, 2026, 8:36:00 PM (14 hours ago) Feb 19
    to Rakina Zata Amni, Liang Zhao, Dave Risney, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, edg...@microsoft.com, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Dave Risney, Liang Zhao and Rakina Zata Amni

    Monica Chintala voted and added 1 comment

    Votes added by Monica Chintala

    Commit-Queue+1

    1 comment

    File content/renderer/render_frame_impl.cc
    Line 989, Patchset 9: if (commit_params.origin_to_commit) {
    Liang Zhao . unresolved

    Could you add comment on when commit_params.origin_to_commit does not have value and what's the impact of leaving navigation_params->origin_to_commit unset.

    Monica Chintala

    This is needed for some tests(RenderFrameImplTest/RenderViewImplTest) that creates DummyCommitNavigationParams using blink::CreateCommitNavigationParams().

    Also, this check exists before and removed when we changed origin_to_commit was always set but in the current cl I made it optional so added the check back

    https://source.chromium.org/chromium/chromium/src/+/ae845bfbaace3a356b66de078d6d70c84192c7f7:content/renderer/render_frame_impl.cc;dlc=805c26171d90dd5e760db7753484729ee9b28df2

    Rakina Zata Amni

    Would it be possible to just set the origin_to_commit value on those tests, or are there other cases that won't set this?

    Monica Chintala

    Yes, tests mostly in RenderFrameImplTest/RenderViewImplTest if using blink::CreateCommitNavigationParams() fails when origin_to_commit isn't set

    Also Fixed PasswordAutofillAgentTest.SendPasswordFormsTest_ReloadTab and
    TranslateAgentBrowserTest.BackToTranslatablePage by passing origin_to_commit in RenderViewTest::GoToOffset and RenderViewTest::Reload

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dave Risney
    • Liang Zhao
    • Rakina Zata Amni
    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: Iac078d4811636102975f8d91c3e03a96122a8db4
    Gerrit-Change-Number: 7165327
    Gerrit-PatchSet: 21
    Gerrit-Owner: Monica Chintala <moni...@microsoft.com>
    Gerrit-Reviewer: Liang Zhao <lz...@microsoft.com>
    Gerrit-Reviewer: Monica Chintala <moni...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Dave Risney <david....@microsoft.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dave Risney <david....@microsoft.com>
    Gerrit-Attention: Liang Zhao <lz...@microsoft.com>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Feb 2026 01:35:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Liang Zhao <lz...@microsoft.com>
    Comment-In-Reply-To: Monica Chintala <moni...@microsoft.com>
    Comment-In-Reply-To: Rakina Zata Amni <rak...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages