summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 23:03:06 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 23:03:06 +0000
commit95df17a8375f6f21b5e08491f723b39610f7f294 (patch)
tree4fedcbc1a26b2a94711385feb0cc08cd770a3c51
parent6efddb457767a3c88ef8be5390f9cba9ea7d2643 (diff)
downloadchromium_src-95df17a8375f6f21b5e08491f723b39610f7f294.zip
chromium_src-95df17a8375f6f21b5e08491f723b39610f7f294.tar.gz
chromium_src-95df17a8375f6f21b5e08491f723b39610f7f294.tar.bz2
Don't reload into an app process.
NavigationEntries are not safe to move from one process to another. BUG=80621,102408 TEST=Reload a page after installing it as an app. No process swap. Review URL: http://codereview.chromium.org/8443005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108571 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc4
-rw-r--r--chrome/renderer/chrome_content_renderer_client.cc9
-rw-r--r--content/browser/tab_contents/navigation_entry.h2
-rw-r--r--content/browser/tab_contents/render_view_host_manager.cc12
4 files changed, 6 insertions, 21 deletions
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 0719038..6872c1e 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -288,7 +288,8 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcessRedirectBack) {
// Ensure that reloading a URL after installing or uninstalling it as an app
// correctly swaps the process. (http://crbug.com/80621)
-IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
+// Disabled until we get a correct fix for 80621. See http://crbug.com/102408.
+IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePopupBlocking);
@@ -369,7 +370,6 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
contents->render_view_host()->process()->id()));
}
-
// Tests that if we have a non-app process (path3/container.html) that has an
// iframe with a URL in the app's extent (path1/iframe.html), then opening a
// link from that iframe to a new window to a URL in the app's extent (path1/
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index c0d1e91..75f4388 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -784,15 +784,6 @@ bool ChromeContentRendererClient::CrossesExtensionExtents(
old_url = frame->top()->opener()->top()->document().url();
}
- // If this is a reload, check whether it has the wrong process type. We
- // should send it to the browser if it's an extension URL (e.g., hosted app)
- // in a normal process, or if it's a process for an extension that has been
- // uninstalled.
- if (old_url == new_url) {
- if (is_extension_url != extension_dispatcher_->is_extension_process())
- return true;
- }
-
// TODO(creis): Temporary workaround for crbug.com/59285: Only return true if
// we would enter an extension app's extent from a non-app, or if we leave an
// extension with no web extent. We avoid swapping processes to exit a hosted
diff --git a/content/browser/tab_contents/navigation_entry.h b/content/browser/tab_contents/navigation_entry.h
index 5f729c5..eea3f35 100644
--- a/content/browser/tab_contents/navigation_entry.h
+++ b/content/browser/tab_contents/navigation_entry.h
@@ -209,7 +209,7 @@ class CONTENT_EXPORT NavigationEntry {
//
// Note that the SiteInstance should usually not be changed after it is set,
// but this may happen if the NavigationEntry was cloned and needs to use a
- // different SiteInstance, or if a hosted app is installed or uninstalled.
+ // different SiteInstance.
void set_site_instance(SiteInstance* site_instance);
SiteInstance* site_instance() const {
return site_instance_;
diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc
index 2627862..61b084b 100644
--- a/content/browser/tab_contents/render_view_host_manager.cc
+++ b/content/browser/tab_contents/render_view_host_manager.cc
@@ -387,15 +387,9 @@ SiteInstance* RenderViewHostManager::GetSiteInstanceForEntry(
NavigationController& controller = delegate_->GetControllerForRenderManager();
content::BrowserContext* browser_context = controller.browser_context();
- // If the entry has an instance already we should use it, unless the URL
- // is part of an app that has been installed or uninstalled since the last
- // visit.
- if (entry.site_instance()) {
- if (entry.site_instance()->HasWrongProcessForURL(dest_url))
- return curr_instance->GetRelatedSiteInstance(dest_url);
- else
- return entry.site_instance();
- }
+ // If the entry has an instance already we should use it.
+ if (entry.site_instance())
+ return entry.site_instance();
// (UGLY) HEURISTIC, process-per-site only:
//