summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 19:42:33 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 19:42:33 +0000
commit91451171aa98b6e44238517f39fc58a86028d75d (patch)
treea67533d2bffddf114314e8e7235a5591c21233b7 /chrome/browser/browser_process_impl.cc
parent3a4f359fc1413e816423d137e7dc67abd8db5921 (diff)
downloadchromium_src-91451171aa98b6e44238517f39fc58a86028d75d.zip
chromium_src-91451171aa98b6e44238517f39fc58a86028d75d.tar.gz
chromium_src-91451171aa98b6e44238517f39fc58a86028d75d.tar.bz2
Fix bug when accessing g_browser_process->broker_services() at shutdown.
BUG=28501 Review URL: http://codereview.chromium.org/435001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 05d4299..80d6d57 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -139,6 +139,7 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
created_io_thread_(false),
created_file_thread_(false),
created_db_thread_(false),
+ created_process_launcher_thread_(false),
created_profile_manager_(false),
created_local_state_(false),
#if defined(OS_WIN)
@@ -212,6 +213,10 @@ BrowserProcessImpl::~BrowserProcessImpl() {
// request before going away.
ResetIOThread();
+ // Stop the process launcher thread after the IO thread, in case the IO thread
+ // posted a task to terminate a process on the process launcher thread.
+ process_launcher_thread_.reset();
+
// Clean up state that lives on the file_thread_ before it goes away.
if (resource_dispatcher_host_.get()) {
resource_dispatcher_host()->download_file_manager()->Shutdown();
@@ -383,6 +388,17 @@ void BrowserProcessImpl::CreateDBThread() {
db_thread_.swap(thread);
}
+void BrowserProcessImpl::CreateProcessLauncherThread() {
+ DCHECK(!created_process_launcher_thread_ && !process_launcher_thread_.get());
+ created_process_launcher_thread_ = true;
+
+ scoped_ptr<base::Thread> thread(
+ new BrowserProcessSubThread(ChromeThread::PROCESS_LAUNCHER));
+ if (!thread->Start())
+ return;
+ process_launcher_thread_.swap(thread);
+}
+
void BrowserProcessImpl::CreateProfileManager() {
DCHECK(!created_profile_manager_ && profile_manager_.get() == NULL);
created_profile_manager_ = true;