Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: content/renderer/history_controller.cc

Issue 2023013002: Prevent renderer kills for in-page navigations on subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase filter file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/history_controller.cc
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc
index ddd187853be623ef5d15238c56eb3b139108b7ce..8f1bc3462f72bd98e69822ffddff0db57b4e1350 100644
--- a/content/renderer/history_controller.cc
+++ b/content/renderer/history_controller.cc
@@ -135,8 +135,12 @@ void HistoryController::RecursiveGoToEntry(
RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
const WebHistoryItem& new_item =
provisional_entry_->GetItemForFrame(render_frame);
- const WebHistoryItem& old_item =
- current_entry_->GetItemForFrame(render_frame);
+
+ // Use the last committed history item for the frame rather than
+ // current_entry_, since the latter may not accurately reflect which URL is
+ // currently committed in the frame. See https://crbug.com/612713#c12.
+ const WebHistoryItem& old_item = render_frame->current_history_item();
+
if (new_item.isNull())
return;
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | content/renderer/history_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698