Commit 26efe319 authored by pmeenan@chromium.org's avatar pmeenan@chromium.org

Added the RenderView routing_id to the DidCommitProvisionalLoad message.

This fixes an issue introduced by https://codereview.chromium.org/135723003/
where the navigation messages are no longer associated with the
RenderView and as a result the resource loader was not resetting state
for new navigations.

BUG=391741

Review URL: https://codereview.chromium.org/368953006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284985 0039d316-1c4b-4281-b951-d872f2087c98
parent 4c1ae71b
...@@ -45,7 +45,15 @@ bool ResourceSchedulerFilter::OnMessageReceived(const IPC::Message& message) { ...@@ -45,7 +45,15 @@ bool ResourceSchedulerFilter::OnMessageReceived(const IPC::Message& message) {
} }
if (PageTransitionIsMainFrame(params.transition) && if (PageTransitionIsMainFrame(params.transition) &&
!params.was_within_same_page) { !params.was_within_same_page) {
scheduler->OnNavigate(child_id_, message.routing_id()); // We need to track the RenderViewHost routing_id because of downstream
// dependencies (crbug.com/392171 DownloadRequestHandle,
// SaveFileManager, ResourceDispatcherHostImpl, MediaStreamUIProxy,
// SpeechRecognitionDispatcherHost and possibly others). They look up
// the view based on the ID stored in the resource requests.
// Once those dependencies are unwound or moved to RenderFrameHost
// (crbug.com/304341) we can move the client to be based on the
// routing_id of the RenderFrameHost.
scheduler->OnNavigate(child_id_, params.render_view_routing_id);
} }
break; break;
} }
......
...@@ -153,6 +153,16 @@ IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params, ...@@ -153,6 +153,16 @@ IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params,
// Notifies the browser that for this navigation, the session history was // Notifies the browser that for this navigation, the session history was
// successfully cleared. // successfully cleared.
IPC_STRUCT_MEMBER(bool, history_list_was_cleared) IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
// The routing_id of the render view associated with the navigation.
// We need to track the RenderViewHost routing_id because of downstream
// dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager,
// ResourceDispatcherHostImpl, MediaStreamUIProxy,
// SpeechRecognitionDispatcherHost and possibly others). They look up the view
// based on the ID stored in the resource requests. Once those dependencies
// are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the
// client to be based on the routing_id of the RenderFrameHost.
IPC_STRUCT_MEMBER(int, render_view_routing_id)
IPC_STRUCT_END() IPC_STRUCT_END()
IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params)
......
...@@ -2980,6 +2980,14 @@ void RenderFrameImpl::UpdateURL(blink::WebFrame* frame) { ...@@ -2980,6 +2980,14 @@ void RenderFrameImpl::UpdateURL(blink::WebFrame* frame) {
params.is_post = false; params.is_post = false;
params.post_id = -1; params.post_id = -1;
params.page_id = render_view_->page_id_; params.page_id = render_view_->page_id_;
// We need to track the RenderViewHost routing_id because of downstream
// dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager,
// ResourceDispatcherHostImpl, MediaStreamUIProxy,
// SpeechRecognitionDispatcherHost and possibly others). They look up the view
// based on the ID stored in the resource requests. Once those dependencies
// are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the
// client to be based on the routing_id of the RenderFrameHost.
params.render_view_routing_id = render_view_->routing_id();
params.socket_address.set_host(response.remoteIPAddress().utf8()); params.socket_address.set_host(response.remoteIPAddress().utf8());
params.socket_address.set_port(response.remotePort()); params.socket_address.set_port(response.remotePort());
WebURLResponseExtraDataImpl* extra_data = GetExtraDataFromResponse(response); WebURLResponseExtraDataImpl* extra_data = GetExtraDataFromResponse(response);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment