summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 22:10:32 +0000
committerstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 22:10:32 +0000
commit120655dce0bc56e15d64bc0d075f05e703dcf2cd (patch)
tree656ffe5fb4bedb72d8ceb7414f6a3b8d947bce4a /chrome/browser/browser_process_impl.cc
parent5fdc1f1f719d861693f9c6107202ac9b0287c09b (diff)
downloadchromium_src-120655dce0bc56e15d64bc0d075f05e703dcf2cd.zip
chromium_src-120655dce0bc56e15d64bc0d075f05e703dcf2cd.tar.gz
chromium_src-120655dce0bc56e15d64bc0d075f05e703dcf2cd.tar.bz2
Cleanup AutomationProviderList to fix shutdown crashes on ChromeOS auto tests
There is a circular relationship between BrowserProcessImpl and AutomationProvider. To clean this up and eliminate a shutdown crash: 1. Eliminate the AutomationProviderList singleton instance; it is already clearly owned by BrowserProcessImpl 2. Eliminate the calls to g_browser_process->Add/ReleaseModule in AutomationProvider since BrowserProcessImpl already owns AutomationProviderList (which owns any AutomationProvider instances). This could possibly have side effects if AutomationProvider attempts to access the message loop after the last call to BrowserProcessImpl::ReleaseModule exits the message loop, but that shouldn't be happening. BUG=96030 TEST=./run_remote_tests.sh --remote=localhost --ssh_port 9222 --use_emerged suite_Smoke and ensure no crashes occur in ~AutomationProvider Review URL: http://codereview.chromium.org/7790031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 11e1467..9f4d82f 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -525,11 +525,10 @@ ThumbnailGenerator* BrowserProcessImpl::GetThumbnailGenerator() {
return &thumbnail_generator_;
}
-AutomationProviderList* BrowserProcessImpl::InitAutomationProviderList() {
+AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() {
DCHECK(CalledOnValidThread());
- if (automation_provider_list_.get() == NULL) {
- automation_provider_list_.reset(AutomationProviderList::GetInstance());
- }
+ if (automation_provider_list_.get() == NULL)
+ automation_provider_list_.reset(new AutomationProviderList());
return automation_provider_list_.get();
}