commit | 0dbc93aff709fb272bb18a17d33252f1767bcc13 | [log] [tgz] |
---|---|---|
author | Nate Chapin <[email protected]> | Fri Mar 28 17:02:52 2025 |
committer | Chromium LUCI CQ <[email protected]> | Fri Mar 28 17:02:52 2025 |
tree | f5b087a46bcabf50c5ef5bb629c81f4ce67ebc23 | |
parent | 0dc2027efa55c69b260868f7d5a3356a470470aa [diff] [blame] |
NavigationControllerImpl::NavigateToNavigationApiKey should not crash on a null committed origin Fixed: 403308727 Test: NavigationControllerBrowserTest.NavigateToNavigationApiKey_NullCommittedOrigin Change-Id: Ic2fe9c6e01e48981096e381ffc202ce8f429b5ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6405178 Commit-Queue: Nate Chapin <[email protected]> Reviewed-by: Rakina Zata Amni <[email protected]> Cr-Commit-Position: refs/heads/main@{#1439499}
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc index 00d0926..1107361b 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -4944,8 +4944,9 @@ FrameTreeNode* node = initiator_rfh->frame_tree_node(); FrameNavigationEntry* current_entry = GetLastCommittedEntry()->GetFrameEntry(node); - if (!current_entry) + if (!current_entry || !current_entry->committed_origin()) { return; + } // TODO(crbug.com/40878000): Make sure that the right task ID is passed // when `navigation.traverseTo()` is called.