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

Unified Diff: content/renderer/history_controller.h

Issue 2144823002: Clear stale NavigationParams from HistoryController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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.h
diff --git a/content/renderer/history_controller.h b/content/renderer/history_controller.h
index ff20596701492e50adce619e98005bbf8c8c0b84..ac522418889ed302cd63f711c09b87c70911b51b 100644
--- a/content/renderer/history_controller.h
+++ b/content/renderer/history_controller.h
@@ -153,11 +153,15 @@ class CONTENT_EXPORT HistoryController {
// A HistoryEntry representing the page that is being loaded, or an empty
// scoped_ptr if no page is being loaded.
std::unique_ptr<HistoryEntry> provisional_entry_;
- // The NavigationParams corresponding to the last load that was initiated by
- // |GoToEntry|. This is kept around so that it can be passed into existing
- // frames modified during a history navigation in GoToEntry(), and can be
+
+ // The NavigationParams corresponding to the last back/forward load that was
+ // initiated by |GoToEntry|. This is kept around so that it can be passed into
+ // existing frames affected by a history navigation in GoToEntry(), and can be
// passed into frames created after the commit that resulted from the
// navigation in GetItemForNewChildFrame().
+ //
+ // This is reset in UpdateForCommit if we see a commit from a different
+ // navigation, to avoid using stale parameters.
std::unique_ptr<NavigationParams> navigation_params_;
DISALLOW_COPY_AND_ASSIGN(HistoryController);
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | content/renderer/history_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698