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

Unified Diff: chrome/browser/tab_contents/render_view_host_manager.cc

Issue 67201: Fix the process creation problem. This forces transitions between... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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: chrome/browser/tab_contents/render_view_host_manager.cc
===================================================================
--- chrome/browser/tab_contents/render_view_host_manager.cc (revision 13870)
+++ chrome/browser/tab_contents/render_view_host_manager.cc (working copy)
@@ -277,7 +277,7 @@
return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessPerTab);
}
-bool RenderViewHostManager::ShouldSwapRenderViewsForNavigation(
+bool RenderViewHostManager::ShouldSwapProcessesForNavigation(
const NavigationEntry* cur_entry,
const NavigationEntry* new_entry) const {
if (!cur_entry || !new_entry)
@@ -378,6 +378,13 @@
if (SiteInstance::IsSameWebSite(current_url, dest_url)) {
return curr_instance;
+ } else if (ShouldSwapProcessesForNavigation(curr_entry, &entry)) {
+ // When we're swapping, we need to force the site instance AND browsing
+ // instance to be new ones. This prevents some cases where we'll re-use
+ // processes opened from the New Tab Page because all NTP's have the same
+ // BrowsingInstance.
Charlie Reis 2009/04/16 22:00:56 I had trouble following the last sentence. Perhap
+ return SiteInstance::CreateSiteInstance(
+ delegate_->GetControllerForRenderManager()->profile());
} else {
// Start the new renderer in a new SiteInstance, but in the current
// BrowsingInstance. It is important to immediately give this new
@@ -489,7 +496,7 @@
new_instance = GetSiteInstanceForEntry(entry, curr_instance);
if (new_instance != curr_instance ||
- ShouldSwapRenderViewsForNavigation(
+ ShouldSwapProcessesForNavigation(
delegate_->GetLastCommittedNavigationEntryForRenderManager(),
&entry)) {
// New SiteInstance.

Powered by Google App Engine
This is Rietveld 408576698