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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 599253002: Fix SiteInstance ref counting issue in RenderFrameHostManager::CommitNavigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 52bd32f37601dc2185bb795d53305a4cc93df6cd..0663346d8ce240e2b519724cc500d4d0b7f5a644 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -626,7 +626,7 @@ void RenderFrameHostManager::CommitNavigation(
SiteInstance* current_instance = render_frame_host_->GetSiteInstance();
// TODO(clamy): Replace the default values by the right ones. This may require
// some storing in RequestNavigation.
- SiteInstance* new_instance = GetSiteInstanceForNavigation(
+ scoped_refptr<SiteInstance> new_instance = GetSiteInstanceForNavigation(
info.navigation_url,
NULL,
navigation_request_->info().navigation_params.transition_type,
@@ -635,9 +635,9 @@ void RenderFrameHostManager::CommitNavigation(
DCHECK(!pending_render_frame_host_.get());
// TODO(clamy): Update how pending WebUI objects are handled.
- if (current_instance != new_instance) {
+ if (current_instance != new_instance.get()) {
CreateRenderFrameHostForNewSiteInstance(
- current_instance, new_instance, frame_tree_node_->IsMainFrame());
+ current_instance, new_instance.get(), frame_tree_node_->IsMainFrame());
DCHECK(pending_render_frame_host_.get());
// TODO(clamy): Wait until the navigation has committed before swapping
// renderers.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698