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

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

Issue 1944013003: Move ownership of source SiteInstance to the FrameNavigationEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index e9d4f7bb2c6742cc9dd855f703f50553376997a8..e7dc6a2a5ac7ac1e08cfafad19802c91d2e31e5a 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -773,19 +773,19 @@ void NavigatorImpl::RequestTransferURL(
}
// TODO(creis): Handle POST submissions. See https://crbug.com/582211 and
// https://crbug.com/101395.
- entry->AddOrUpdateFrameEntry(node, -1, -1, nullptr, dest_url,
- referrer_to_use, PageState(), "GET", -1);
+ entry->AddOrUpdateFrameEntry(
+ node, -1, -1, static_cast<SiteInstanceImpl*>(source_site_instance),
+ nullptr, dest_url, referrer_to_use, PageState(), "GET", -1);
} else {
// Main frame case.
entry = NavigationEntryImpl::FromNavigationEntry(
controller_->CreateNavigationEntry(
dest_url, referrer_to_use, page_transition, is_renderer_initiated,
std::string(), controller_->GetBrowserContext()));
+ entry->root_node()->frame_entry->set_source_site_instance(
+ static_cast<SiteInstanceImpl*>(source_site_instance));
}
- // The source_site_instance may matter for navigations via RenderFrameProxy.
- entry->set_source_site_instance(
- static_cast<SiteInstanceImpl*>(source_site_instance));
entry->SetRedirectChain(redirect_chain);
// Don't allow an entry replacement if there is no entry to replace.
// http://crbug.com/457149

Powered by Google App Engine
This is Rietveld 408576698