summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-04 20:23:01 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-04 20:23:01 +0000
commit263ff4f2eda2f117aa9055c324387721a33650cc (patch)
tree90c4180e45510b3466a0eba590aa6fecdf5d9eca /chrome
parent0d5d209bd75b57328f141ccdd83ccc24753f8006 (diff)
downloadchromium_src-263ff4f2eda2f117aa9055c324387721a33650cc.zip
chromium_src-263ff4f2eda2f117aa9055c324387721a33650cc.tar.gz
chromium_src-263ff4f2eda2f117aa9055c324387721a33650cc.tar.bz2
Cause Chrome Frame to follow the fast shutdown path, which cleans up infobars and avoids a crash on shutdown.
Chrome Frame Android were the only remaining things in Chrome that appear not to use the fast shutdown path and afaict the non-fast shutdown path no longer works. BUG=148398 TEST=Visit hyves.nl or some other CF-aware site that pops up a translation bar in CF. Close IE, using an attached debugger or your mechanism of choice observe that Chrome doesn't crash during shutdown. TBR=sky Review URL: https://chromiumcodereview.appspot.com/11746029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chrome_content_browser_client.cc3
-rw-r--r--chrome/browser/ui/views/external_tab_container_win.cc4
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 20a4a83..c31883c 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1504,8 +1504,7 @@ AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() {
}
bool ChromeContentBrowserClient::IsFastShutdownPossible() {
- const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
- return !browser_command_line.HasSwitch(switches::kChromeFrame);
+ return true;
}
void ChromeContentBrowserClient::OverrideWebkitPrefs(
diff --git a/chrome/browser/ui/views/external_tab_container_win.cc b/chrome/browser/ui/views/external_tab_container_win.cc
index 42e67b2..070725c 100644
--- a/chrome/browser/ui/views/external_tab_container_win.cc
+++ b/chrome/browser/ui/views/external_tab_container_win.cc
@@ -266,6 +266,10 @@ void ExternalTabContainerWin::Uninitialize() {
if (web_contents_.get()) {
UnregisterRenderViewHost(web_contents_->GetRenderViewHost());
+ // Explicitly tell the RPH to shutdown, as doing so is the only thing that
+ // cleans up certain resources like infobars (crbug.com/148398).
+ web_contents_->GetRenderProcessHost()->FastShutdownIfPossible();
+
if (GetWidget()->GetRootView())
GetWidget()->GetRootView()->RemoveAllChildViews(true);