Index: content/browser/frame_host/navigator.h |
diff --git a/content/browser/frame_host/navigator.h b/content/browser/frame_host/navigator.h |
index 3424428fc070d950bbe90ae192d2ce6fdfb12075..0677586ccdc78da318328300c16ba0239dd676a0 100644 |
--- a/content/browser/frame_host/navigator.h |
+++ b/content/browser/frame_host/navigator.h |
@@ -72,10 +72,18 @@ class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { |
const base::string16& error_description, |
bool was_ignored_by_handler) {} |
- // The RenderFrameHostImpl has committed a navigation. |
+ // The RenderFrameHostImpl has committed a navigation. The Navigator is |
+ // responsible for resetting |navigation_handle| at the end of this method and |
+ // should not attempt to keep it alive. |
+ // Note: it is possible that |navigation_handle| is not the NavigationHandle |
+ // stored in the RenderFrameHost that just committed. This happens for example |
+ // when a same-page navigation commits while another navigation is ongoing. |
+ // The Navigator should use the NavigationHandle provided by this method and |
+ // not attempt to access the RenderFrameHost's NavigationsHandle. |
virtual void DidNavigate( |
RenderFrameHostImpl* render_frame_host, |
- const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {} |
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params, |
+ std::unique_ptr<NavigationHandleImpl> navigation_handle) {} |
// Called by the NavigationController to cause the Navigator to navigate |
// to the current pending entry. The NavigationController should be called |