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

Unified Diff: chrome/browser/tab_contents/navigation_controller.cc

Issue 5610005: Makes instant run before unload listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Fix comments and reset session id appropriately Created 10 years 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: chrome/browser/tab_contents/navigation_controller.cc
diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc
index af5d3b7bc7ee40767bee32ce2d4b294ea535cdf3..e4c5aaca603406240d25f3e277601798fd94f683 100644
--- a/chrome/browser/tab_contents/navigation_controller.cc
+++ b/chrome/browser/tab_contents/navigation_controller.cc
@@ -979,8 +979,10 @@ void NavigationController::CopyStateFromAndPrune(NavigationController* source) {
// Take over the session id from source.
session_id_ = source->session_id_;
- // Reset source's session id as we're taking it over.
- source->session_id_.clear();
+ // Reset source's session id as we're taking it over. We give it a new id in
+ // case source is added later on, which can happen with instant enabled if the
+ // tab has a before unload handler.
+ source->session_id_ = SessionID();
}
void NavigationController::PruneAllButActive() {
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.h ('k') | chrome/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698