What steps will reproduce the problem?
(1) Navigate to web page with cross-origin redirect (http to https in my case).
(2) Navigate to the same page the second time from the same tab.
(3) It will cause of new renderer creation because the second navigation will be considered as new SiteInstance.
(4) Get WebContentsGetter object from request as ResourceRequestInfo::ForRequest(request)->GetWebContentsGetterForRequest();
(https://cs.chromium.org/chromium/src/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc?rcl=0&l=516)
(5) Get web_contents by call the callback from UI thread.
What is the expected result?
Values of web_contents->GetRenderProcessHost()->GetID() and
web_contents->GetMainFrame()->GetRoutingID()
match the new renderer.
What happens instead?
These values match the old renderer.
Please use labels and text to provide additional information.
The function WebContentsImpl::FromRenderFrameHostID (https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?rcl=1481876342&l=666) for new renderer IDs returns WebContents connected with the old renderer.
Comment 1 by clamy@chromium.org
, Dec 16 2016