Fix SiteInstance ref counting issue in RenderFrameHostManager::CommitNavigation.
commita175a7c2191008c6a03e63c451525e1e7ef3c437
authoralexmos <alexmos@chromium.org>
Thu, 25 Sep 2014 00:10:08 +0000 (24 17:10 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 25 Sep 2014 00:10:41 +0000 (25 00:10 +0000)
tree084f216878c57f57e9287655910cc899f38ff2d4
parent8bbce0365dc6ff4773279be1afa7ff7d462bc042
Fix SiteInstance ref counting issue in RenderFrameHostManager::CommitNavigation.

RenderFrameHostManager::CommitNavigation was not using scoped_refptr when it created a new SiteInstance.  This resulted in the new SiteInstance being deleted in FrameTree::CreateProxiesForSiteInstance after iterating through the frame tree with base::Bind due to its ref count falling to 0.

This was the cause of crashes in  RenderFrameHostManagerTest.BrowserSideNavigationCrossSiteNavigation and RenderFrameHostManagerTest.BrowserSideNavigationIgnoreStaleNavigationCommit under --site-per-process.  These tests now pass.

BUG=417518

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

Cr-Commit-Position: refs/heads/master@{#296584}
content/browser/frame_host/render_frame_host_manager.cc